OFFSET
1,1
COMMENTS
The 'nine' is not arbitrary. Waring stated that every natural number can be expressed as a sum of at most nine cubes (cf. A002804).
LINKS
Wikipedia, Waring's Problem
Eric Weisstein's World of Mathematics, Waring's Problem
EXAMPLE
29 is in the sequence since 1^3 + 1^3 + 3^3 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 2^3 + 2^3 + 2^3.
123 is in the sequence since 2^3 + 2^3 + 2^3 + 2^3 + 3^3 + 4^3 = 1^3 + 1^3 + 1^3 + 1^3 + 1^3 + 3^3 + 3^3 + 4^3.
PROG
(PARI) upto(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); select(x->x==2, v, 1) \\ David A. Corneth, Dec 23 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Patrick De Geest, Dec 22 2024
STATUS
approved
