Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #24 May 01 2022 14:00:41
%S 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,
%T 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,
%U 6,5,6,5,10,5,8,7,6,4,6,4,12,8,8,8,8,7
%N 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.
%H Alois P. Heinz, <a href="/A247599/b247599.txt">Table of n, a(n) for n = 0..10000</a>
%p b:= proc(n, i) option remember; `if`(n=0, 1,
%p `if`(n<0 or i<0, 0, add(b(n-2^i*j^3, i-1),
%p j=0..iroot(iquo(n, 2^i), 3))))
%p end:
%p a:= n-> b(n, ilog2(n)):
%p seq(a(n), n=0..100); # _Alois P. Heinz_, Dec 28 2014
%t b[n_, i_] := b[n, i] = If[n == 0, 1,
%t If[n < 0 || i < 0, 0, Sum[b[n - 2^i*j^3, i - 1],
%t {j, 0, Floor@Quotient[n, 2^i]^(1/3)}]]];
%t a[n_] := b[n, Floor@Log2[n]];
%t Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, May 01 2022, after _Alois P. Heinz_ *)
%K nonn,look
%O 0,9
%A _David S. Newman_, Sep 21 2014