A283188 A periodic sequence of 8-bit binary numbers for single-bit multi-frequency generation.
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
Offset: 0
Examples
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]
Crossrefs
Cf. A272614.
Programs
-
Mathematica
a[n_] := Sum[Floor@Mod[(n - k)/k, 2]*2^(8 - k), {k, 1, 8}]; Table[a[n], {n, 0, 64}]
-
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
Formula
a(n) = Sum_{k = 1..8} (floor((n - k)/k) mod 2)*2^(8 - k).
Comments