OFFSET
0,9
LINKS
David A. Corneth, Table of n, a(n) for n = 0..10000
EXAMPLE
a(8) = 2 via 8*0^3 + 1*2^3 = 1 * 0^3 + 8*1^3.
MAPLE
f:= proc(x, m, M)
local i;
option remember;
if x = 0 then return 1
elif m = 0 then return 0
fi;
add(procname(x-i^3, m-1, i), i=1..min(M, floor(x^(1/3))));
end proc:
map(f, [$0..150], 9, 150); # Robert Israel, Jan 23 2025
PROG
(PARI) first(n) = my(v=vector(n), maxb=sqrtnint(n, 3)); forvec(x=vector(9, i, [0, maxb]), s=sum(i=1, 9, x[i]^3); if(0<s && s<=n, v[s]++); , 1); concat(1, v) \\ David A. Corneth, Jan 23 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved