OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..16384 (terms n = 1..1000 from Andrew Howroyd)
FORMULA
EXAMPLE
a(9) = 3 because there are 3 partitions of 9 into parts of size 3, 5, 6, 9 which are the numbers that have two 1's in their binary representations. The 3 partitions are: 9, 6 + 3 and 3 + 3 + 3. - Andrew Howroyd, Apr 20 2021
MAPLE
H:= proc(n) option remember; add(i, i=Bits[Split](n)) end:
v:= proc(n, k) option remember; `if`(n<1, 0,
`if`(H(n)=k, n, v(n-1, k)))
end:
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, v(i-1, k), k)+b(n-i, v(min(n-i, i), k), k)))
end:
a:= n-> b(n$2, H(n)):
seq(a(n), n=0..80); # Alois P. Heinz, Dec 12 2021
MATHEMATICA
etr[p_] := Module[{b}, b[n_] := b[n] = If[n == 0, 1, Sum[Sum[d*p[d], {d, Divisors[j]}] b[n - j], {j, 1, n}]/n]; b];
EulerT[v_List] := With[{q = etr[v[[#]]&]}, q /@ Range[Length[v]]];
a[n_] := EulerT[Table[DigitCount[k, 2, 1] == DigitCount[n, 2, 1] // Boole, {k, 1, n}]][[n]];
Array[a, 100] (* Jean-François Alcover, Dec 12 2021, after Andrew Howroyd *)
PROG
(PARI) EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
a(n) = {EulerT(vector(n, k, hammingweight(k)==hammingweight(n)))[n]} \\ Andrew Howroyd, Apr 20 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, Feb 10 2004
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Dec 12 2021
STATUS
approved