OFFSET
0,4
LINKS
N. J. A. Sloane, Transforms
Eric Weisstein's World of Mathematics, XOR
FORMULA
a(n) ~ c * 2^n, where c = 0.111118791917413048987034558666...
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
add(Bits[Xor](a(k), a(n-k-2)), k=0..n-2))
end:
seq(a(n), n=0..40); # Alois P. Heinz, Aug 30 2018
MATHEMATICA
a[0] = 0; a[1] = 1; a[n_] := a[n] = Sum[BitXor[a[k], a[n - k - 2]], {k, 0, n - 2}]; Table[a[n], {n, 0, 36}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Aug 30 2018
STATUS
approved