|
|
|
|
0, 1, 1, 1, 1, 3, 2, 3, 1, 3, 3, 3, 2, 3, 3, 3, 1, 5, 4, 7, 3, 7, 5, 7, 2, 7, 5, 7, 3, 7, 4, 5, 1, 5, 5, 5, 4, 7, 7, 7, 3, 11, 8, 13, 5, 7, 7, 7, 2, 7, 7, 7, 5, 13, 8, 11, 3, 7, 7, 7, 4, 5, 5, 5, 1, 7, 6, 7, 5, 13, 9, 13, 4, 15, 11, 15, 7, 15, 10, 11, 3, 11, 11, 11, 8, 13, 13, 13, 5, 13, 12, 15, 7, 15, 9, 11, 2, 11, 9, 15, 7, 15, 12, 13, 5, 13, 13, 13, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,6
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
a[0] = 0; a[1] = 1; a[n_] := If[EvenQ@ n, a[n/2], a[(n - 1)/2] + a[(n + 1)/2]]; Table[If[EvenQ@ n, a[n/2], BitOr[a[#], a[# + 1]] &[(n - 1)/2]], {n, 0, 108}] (* Michael De Vlieger, Mar 22 2017 *)
|
|
PROG
|
(PARI) A(n) = if(n<2, n, if(n%2, A(n\2) + A((n + 1)/2), A(n/2)));
a(n) = if(n<2, n, if(n%2, bitor(A(n\2), A((n + 1)/2)), A(n\2)));
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|