OFFSET
0,5
COMMENTS
The difference between the number of compositions (ordered partitions) of n into an even number of powers of 2 and the number of compositions (ordered partitions) of n into an odd number of powers of 2.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..5000
Paul Barry, Conjectures and results on some generalized Rueppel sequences, arXiv:2107.00442 [math.CO], 2021.
FORMULA
G.f. A(x) satisfies: A(x) = A(x^2) / (1 + x * A(x^2)).
a(0) = 1; a(n) = -Sum_{k=1..n} A209229(k) * a(n-k).
MAPLE
b:= proc(n, t) option remember; `if`(n=0, t,
add(b(n-2^i, -t), i=0..ilog2(n)))
end:
a:= n-> b(n, 1):
seq(a(n), n=0..60); # Alois P. Heinz, Dec 03 2020
MATHEMATICA
nmax = 55; CoefficientList[Series[1/(1 + Sum[x^(2^k), {k, 0, Floor[Log[2, nmax]] + 1}]), {x, 0, nmax}], x]
a[0] = 1; a[n_] := a[n] = -Sum[If[IntegerQ[Log[2, k]], 1, 0] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 55}]
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Dec 03 2020
STATUS
approved