login
A247599
Number of ways of writing n as a sum: n = 2^0*k(0)^3 + 2^1*k(1)^3 + 2^2*k(2)^3 + ... where the k's are nonnegative integers.
1
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 2, 2, 1, 4, 2, 2, 2, 4, 3, 2, 2, 5, 4, 3, 3, 4, 3, 2, 2, 6, 4, 4, 4, 4, 3, 2, 3, 7, 5, 4, 4, 4, 3, 3, 4, 8, 5, 5, 6, 4, 4, 4, 4, 10, 6, 8, 7, 6, 5, 6, 5, 10, 5, 8, 7, 6, 4, 6, 4, 12, 8, 8, 8, 8, 7
OFFSET
0,9
LINKS
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1,
`if`(n<0 or i<0, 0, add(b(n-2^i*j^3, i-1),
j=0..iroot(iquo(n, 2^i), 3))))
end:
a:= n-> b(n, ilog2(n)):
seq(a(n), n=0..100); # Alois P. Heinz, Dec 28 2014
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1,
If[n < 0 || i < 0, 0, Sum[b[n - 2^i*j^3, i - 1],
{j, 0, Floor@Quotient[n, 2^i]^(1/3)}]]];
a[n_] := b[n, Floor@Log2[n]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, May 01 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A354598 A239061 A309025 * A083897 A368212 A025823
KEYWORD
nonn,look
AUTHOR
David S. Newman, Sep 21 2014
STATUS
approved