|
|
|
|
0, 1, 2, 0, 3, 0, 0, 1, 4, 0, 0, 1, 0, 1, 2, 0, 5, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 6, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 0, 1, 2, 0, 3, 0, 0, 1, 4, 0, 0, 1, 0, 1, 2, 0, 7, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 0, 1, 2, 0, 3, 0, 0, 1, 4, 0, 0, 1, 0, 1, 2, 0, 0, 1, 2, 0, 3, 0, 0, 1, 4, 0, 0, 1, 0, 1, 2, 0, 5, 0, 0, 1, 0, 1, 2, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
A fractal sequence, because a permutation of A007814. Removing zeros yields A268727(n) = a(n)+1.
|
|
LINKS
|
|
|
FORMULA
|
Other identities:
|
|
MATHEMATICA
|
A003188[n_]:=BitXor[n, Floor[n/2]]; A006068[n_]:=If[n<2, n, Block[{m=A006068[Floor[n/2]]}, 2m + Mod[Mod[n, 2] + Mod[m, 2], 2]]]; A268717[n_]:=If[n<1, 0, A003188[1 + A006068[n - 1]]]; a[n_]:= Floor[Log[2, BitXor[n, A268717[n + 1]]]]; Table[a[n], {n, 0, 200}] (* Indranil Ghosh, Apr 02 2017 *)
|
|
PROG
|
(PARI) A003188(n) = bitxor(n, n\2);
(Python)
if n<2: return n
else:
return 2*m + (n%2 + m%2)%2
print([int(math.floor(math.log(n^A268717(n + 1), 2))) for n in range(201)]) # Indranil Ghosh, Apr 02 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|