login
A318619
a(0) = 0, a(1) = 1; for n > 1, a(n) = Sum_{k=0..n-2} a(k) XOR a(n-k-2).
0
0, 1, 0, 2, 0, 6, 6, 18, 26, 66, 110, 242, 450, 922, 1826, 3674, 7290, 14586, 29178, 58410, 116538, 233258, 466114, 932426, 1864586, 3729274, 7457386, 14915578, 29828762, 59659322, 119313866, 238631866, 477253498, 954516442, 1909012410, 3818036378, 7636034202
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
Sequence in context: A059444 A328473 A268656 * A340484 A341930 A220608
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Aug 30 2018
STATUS
approved