|
1, 2, 1, 3, 2, 3, 1, 4, 3, 3, 2, 3, 3, 4, 1, 5, 4, 3, 3, 2, 1, 3, 2, 3, 3, 4, 3, 3, 4, 5, 1, 6, 5, 3, 4, 3, 3, 2, 3, 3, 2, 3, 1, 4, 3, 3, 2, 3, 3, 4, 3, 3, 2, 3, 3, 4, 3, 5, 4, 3, 5, 6, 1, 7, 6, 3, 5, 4, 3, 3, 4, 5, 3, 2, 3, 5, 2, 3, 3, 4, 3, 3, 2, 5, 3, 4, 1, 5, 2, 3, 3, 6, 3, 3, 2, 3, 3, 4, 3, 5, 2, 3, 3, 2, 1, 3, 2, 5, 3, 4, 3, 5, 4, 5, 3, 4, 3, 3, 4, 5, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
Other identities. For all n >= 0:
|
|
MATHEMATICA
|
A264977[n_]:= If[n<2, n, If[EvenQ[n], 2 A264977[n/2], BitXor[A264977[(n - 1)/2], A264977[(n + 1)/2]]]]; Table[DigitCount[A264977[2n + 1], 2, 1], {n, 0, 150}] (* Indranil Ghosh, Mar 28 2017 *)
|
|
PROG
|
(Scheme)
(PARI) a(n) = if(n<2, n, if(n%2, bitxor(a((n - 1)/2), a((n + 1)/2)), 2*a(n/2)));
b(n) = if(n<1, 0, b(n\2) + n%2);
for(n=0, 150, print1(b(a(2*n + 1)), ", ")) \\ Indranil Ghosh, Mar 28 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|