|
|
|
|
0, 1, 2, 5, 4, 5, 10, 9, 8, 9, 10, 21, 20, 21, 18, 17, 16, 17, 18, 21, 20, 21, 42, 41, 40, 41, 42, 37, 36, 37, 34, 33, 32, 33, 34, 37, 36, 37, 42, 41, 40, 41, 42, 85, 84, 85, 82, 81, 80, 81, 82, 85, 84, 85, 74, 73, 72, 73, 74, 69, 68, 69, 66, 65, 64, 65, 66, 69, 68, 69, 74, 73, 72, 73, 74, 85, 84, 85, 82, 81, 80, 81, 82
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
No two adjacent bits in the binary representations of a(n) are 1.
The value 0 appears once, otherwise, if the binary representation of a(n) has k set bits then it appears 2^(k-1) times.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
|
|
MATHEMATICA
|
a[n_] := Module[{nh, n3, c}, nh = BitShiftRight[n]; n3 = n + nh; c = BitXor[nh, n3]; BitAnd[n3, c] + BitAnd[nh, c]];
|
|
PROG
|
(Python)
for n in range(77):
print((n^(n*3))/2, end=', ')
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|