OFFSET
0,21
COMMENTS
a(33) is the last zero in this sequence, cf. the link to Mathematics Stack Exchange and also A080673(n) for the largest index k with a(k)=n. - M. F. Hasler, May 30 2014
First occurrence of k beginning with 0: 0, 5, 20, 29, 62, 53, 80, 77, 91, 101, ..., (A080654). - Robert G. Wilson v, May 30 2014
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..10000
H. v. Eitzen, in reply to user James47, What is the largest integer with only one representation as a sum of five nonzero squares? on Mathematics Stack Exchange, May 2014
FORMULA
a(n) = [x^n y^5] Product_{k>=1} 1/(1 - y*x^(k^2)). - Ilya Gutkovskiy, Apr 19 2019
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
`if`(i<1 or t<1, 0, b(n, i-1, t)+
`if`(i^2>n, 0, b(n-i^2, i, t-1))))
end:
a:= n-> b(n, isqrt(n), 5):
seq(a(n), n=0..120); # Alois P. Heinz, May 30 2014
MATHEMATICA
f[n_] := Block[{c = Range@ Sqrt@ n^2}, Length@ IntegerPartitions[n, {5}, c]]; Array[f, 105, 0] (* Robert G. Wilson v, May 30 2014 *)
b[n_, i_, t_] := b[n, i, t] = If[n==0, If[t==0, 1, 0], If[i<1 || t<1, 0, b[n, i-1, t] + If[i^2>n, 0, b[n-i^2, i, t-1]]]]; a[n_] := b[n, Sqrt[n] // Floor, 5]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Oct 12 2015, after Alois P. Heinz *)
PROG
(PARI) A025429(n)=sum(d=sqrtint(max(n, 5)\5), sqrtint(max(n-4, 0)), nn=n-d^2; sum(a=sqrtint(max(nn-d^2, 4)\4), min(sqrtint(max(nn-3, 0)), d), sum(b=sqrtint((nn-a^2)\3-1)+1, min(sqrtint(nn-a^2-2), a), sum(c=sqrtint((t=nn-a^2-b^2)\2-1)+1, min(sqrtint(t-1), b), issquare(t-c^2) )))) \\ M. F. Hasler, May 30 2014
CROSSREFS
KEYWORD
AUTHOR
STATUS
approved