OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
a(5) = 4 because there are 4 partitions of 5 whose binary representations have an even number of binary ones, namely 101, 100+1, 11+1+1, 10+1+1+1.
MAPLE
p:= proc(n) option remember; local c, m;
c:= 0; m:= n;
while m>0 do c:= c +irem(m, 2, 'm') od;
c
end:
b:= proc(n, i, t) option remember;
if n<0 then 0
elif n=0 then 1-t
elif i=0 then 0
else b(n, i-1, t) +b(n-i, i, irem(p(i)+t, 2))
fi
end:
a:= n-> b(n, n, 0):
seq(a(n), n=0..60); # Alois P. Heinz, Feb 21 2011
MATHEMATICA
Table[Length[Select[Map[Apply[Join, #]&, Map[IntegerDigits[#, 2]&, Partitions[n]]], EvenQ[Count[#, 1]]&]], {n, 0, 40}] (* Geoffrey Critzer, Sep 28 2013 *)
PROG
(PARI) seq(n)={apply(t->polcoeff(lift(t), 0), Vec(prod(i=1, n, 1/(1 - x^i*Mod( y^hammingweight(i), y^2-1 )) + O(x*x^n))))} \\ Andrew Howroyd, Jul 20 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
David S. Newman, Feb 23 2005
STATUS
approved