cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A283188 A periodic sequence of 8-bit binary numbers for single-bit multi-frequency generation.

This page as a plain text file.
%I A283188 #23 Mar 08 2025 17:15:27
%S A283188 255,127,191,31,207,71,163,33,240,80,152,24,236,108,174,6,215,87,179,
%T A283188 51,235,73,137,9,252,116,180,20,198,70,170,42,251,91,155,17,229,101,
%U A283188 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
%N A283188 A periodic sequence of 8-bit binary numbers for single-bit multi-frequency generation.
%C A283188 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.
%C A283188 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.
%C A283188 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.
%C A283188 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.
%F A283188 a(n) = Sum_{k = 1..8} (floor((n - k)/k) mod 2)*2^(8 - k).
%e A283188 Binary expansions of the first 16 terms:
%e A283188   [1, 1, 1, 1, 1, 1, 1, 1]
%e A283188   [0, 1, 1, 1, 1, 1, 1, 1]
%e A283188   [1, 0, 1, 1, 1, 1, 1, 1]
%e A283188   [0, 0, 0, 1, 1, 1, 1, 1]
%e A283188   [1, 1, 0, 0, 1, 1, 1, 1]
%e A283188   [0, 1, 0, 0, 0, 1, 1, 1]
%e A283188   [1, 0, 1, 0, 0, 0, 1, 1]
%e A283188   [0, 0, 1, 0, 0, 0, 0, 1]
%e A283188   [1, 1, 1, 1, 0, 0, 0, 0]
%e A283188   [0, 1, 0, 1, 0, 0, 0, 0]
%e A283188   [1, 0, 0, 1, 1, 0, 0, 0]
%e A283188   [0, 0, 0, 1, 1, 0, 0, 0]
%e A283188   [1, 1, 1, 0, 1, 1, 0, 0]
%e A283188   [0, 1, 1, 0, 1, 1, 0, 0]
%e A283188   [1, 0, 1, 0, 1, 1, 1, 0]
%e A283188   [0, 0, 0, 0, 0, 1, 1, 0]
%t A283188 a[n_] := Sum[Floor@Mod[(n - k)/k, 2]*2^(8 - k), {k, 1, 8}];
%t A283188 Table[a[n], {n, 0, 64}]
%o A283188 (PARI) a(n) = sum(k=1, 8, ((floor((n - k) / k)) % 2)*2^(8 - k)); \\ _Indranil Ghosh_, Mar 03 2017
%o A283188 (Python)
%o A283188 def A283188(n):
%o A283188     s=0
%o A283188     for k in range(1,9):
%o A283188         s+=(((n-k)//k)%2) * 2**(8-k)
%o A283188     return s # _Indranil Ghosh_, Mar 03 2017
%Y A283188 Cf. A272614.
%K A283188 nonn,easy
%O A283188 0,1
%A A283188 _Andres Cicuttin_, Mar 02 2017