OFFSET
0,10
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
N. J. A. Sloane, Transforms
FORMULA
Weigh Transform of characteristic function of A001969.
MAPLE
g:= proc(n) option remember; is(add(i, i=Bits[Split](n))::even) end:
b:= proc(n, i) option remember; `if`(i*(i+1)/2<n, 0, `if`(n=0, 1,
b(n, i-1)+`if`(g(i), b(n-i, min(n-i, i-1)), 0)))
end:
a:= n-> b(n$2):
seq(a(n), n=0..100); # Alois P. Heinz, Sep 08 2019
MATHEMATICA
m = 100;
Product[If[EvenQ[DigitCount[k, 2, 1]], 1 + x^k, 1], {k, 1, m}] + O[x]^m // CoefficientList[#, x]& (* Jean-François Alcover, Sep 11 2019, from PARI *)
PROG
(PARI) seq(n)=Vec(prod(k=1, n, if(hammingweight(k)%2==0, 1+x^k, 1) + O(x*x^n))) \\ Andrew Howroyd, Jun 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Christian G. Bower, Feb 17 2006
STATUS
approved