login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A283188 A periodic sequence of 8-bit binary numbers for single-bit multi-frequency generation. 1
255, 127, 191, 31, 207, 71, 163, 33, 240, 80, 152, 24, 236, 108, 174, 6, 215, 87, 179, 51, 235, 73, 137, 9, 252, 116, 180, 20, 198, 70, 170, 42, 251, 91, 155, 17, 229, 101, 165, 5, 220, 92, 186, 58, 234, 66, 130, 2, 247, 117, 189, 29, 205, 77, 169, 33, 242, 82, 146, 18, 238, 110, 174, 12, 221 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
If the updating frequency of numbers is f, then the most significant bit (MSB) changes with frequency f, while the second MSB changes with f/2, the third MSB changes with f/3, fourth MSB with f/4, and so on till the least significant bit (LSB), which changes with f/8.
The length of the cyclic period is 1680 = lcm(2,4,6,8,10,12,14,16). Only 192 numbers are used out of the 256 possible 8-bit binary numbers. Possible number of repetitions within a cycle are 6, 8, 9, and 12.
For a fast continuous production of the sequence, it could be more efficient to implement a cyclic lookup table rather than calculating the numbers each time.
A similar sequence can be obtained from A272614 (excluding the first 8 terms) by selecting the 8 most significant bits after having removed the MSB.
LINKS
FORMULA
a(n) = Sum_{k = 1..8} floor((n - k)/k) mod 2))*2^(8 - k).
EXAMPLE
Binary expansions of the first 16 terms:
[1, 1, 1, 1, 1, 1, 1, 1]
[0, 1, 1, 1, 1, 1, 1, 1]
[1, 0, 1, 1, 1, 1, 1, 1]
[0, 0, 0, 1, 1, 1, 1, 1]
[1, 1, 0, 0, 1, 1, 1, 1]
[0, 1, 0, 0, 0, 1, 1, 1]
[1, 0, 1, 0, 0, 0, 1, 1]
[0, 0, 1, 0, 0, 0, 0, 1]
[1, 1, 1, 1, 0, 0, 0, 0]
[0, 1, 0, 1, 0, 0, 0, 0]
[1, 0, 0, 1, 1, 0, 0, 0]
[0, 0, 0, 1, 1, 0, 0, 0]
[1, 1, 1, 0, 1, 1, 0, 0]
[0, 1, 1, 0, 1, 1, 0, 0]
[1, 0, 1, 0, 1, 1, 1, 0]
[0, 0, 0, 0, 0, 1, 1, 0]
MATHEMATICA
a[n_] := Sum[Floor@Mod[(n - k)/k, 2]*2^(8 - k), {k, 1, 8}];
Table[a[n], {n, 0, 64}]
PROG
(PARI) a(n) = sum(k=1, 8, ((floor((n - k) / k)) % 2)*2^(8 - k)); \\ Indranil Ghosh, Mar 03 2017
(Python)
def A283188(n):
....s=0
....for k in range(1, 9):
........s+=(((n-k)/k)%2) * 2**(8-k)
....return s # Indranil Ghosh, Mar 03 2017
CROSSREFS
Cf. A272614.
Sequence in context: A251860 A145715 A145587 * A334353 A028526 A132828
KEYWORD
nonn
AUTHOR
Andres Cicuttin, Mar 02 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 13:42 EDT 2024. Contains 372480 sequences. (Running on oeis4.)