OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
33 is in the sequence because 33 = 2^2 + 2^2 + 5^2.
MATHEMATICA
max = 130; f[x_] := Sum[x^(k^2), {k, 2, 20}]^3; Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, max}]]
With[{nn=15}, Select[Union[Total/@Tuples[Range[2, nn]^2, 3]], #<=nn^2+8&]] (* Harvey P. Dale, Jul 05 2021 *)
PROG
(Python)
from itertools import count, takewhile, combinations_with_replacement as mc
def aupto(N):
sqrs = list(takewhile(lambda x: x<=N, (i**2 for i in count(2))))
sum3 = set(sum(c) for c in mc(sqrs, 3) if sum(c) <= N)
return sorted(sum3)
print(aupto(129)) # Michael S. Branicky, Dec 17 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 06 2018
STATUS
approved