OFFSET
0,3
COMMENTS
Also the number of partitions of n in which each part occurs a power of 2 (cf. A000079) of times.
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Seiichi Manyama)
EXAMPLE
n | Partitions of n in which each part occurs a power of 2 (cf. A000079) of times
--+------------------------------------------------------------------------------
1 | 1;
2 | 2 = 1+1;
3 | 3 = 2+1;
4 | 4 = 3+1 = 2+2 = 2+1+1 = 1+1+1+1;
5 | 5 = 4+1 = 3+2 = 3+1+1 = 2+2+1;
6 | 6 = 5+1 = 4+2 = 4+1+1 = 3+2+1 = 3+3 = 2+2+1+1 = 2+1+1+1+1;
7 | 7 = 6+1 = 5+2 = 5+1+1 = 4+3 = 4+2+1 = 3+3+1 = 3+2+2 = 3+2+1+1 = 3+1+1+1+1;
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
b(n, i-1)+add(b(n-i*2^j, i-1), j=0..ilog2(n/i))))
end:
a:= n-> b(n$2):
seq(a(n), n=0..60); # Alois P. Heinz, May 13 2018
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0,
b[n, i-1] + Sum[b[n-i*2^j, i-1], {j, 0, Floor@Log2[n/i]}]]];
a[n_] := b[n, n];
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Feb 14 2023, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, May 12 2018
STATUS
approved