OFFSET
0,63
LINKS
FORMULA
a(n)>0 <=> n is in A004432. - M. F. Hasler, Feb 03 2013
a(n) = [x^n y^3] Product_{k>=1} (1 + y*x^(k^2)). - Ilya Gutkovskiy, Apr 22 2019
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
`if`(i<1 or t<1, 0, `if`(i=1, 0, b(n, i-1, t))+
`if`(i^2>n, 0, b(n-i^2, i-1, t-1))))
end:
a:= n-> b(n, isqrt(n), 3):
seq(a(n), n=0..120); # Alois P. Heinz, Feb 07 2013
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n==0, If[t==0, 1, 0], If[i<1 || t<1, 0, If[i==1, 0, b[n, i-1, t]] + If[i^2 > n, 0, b[n-i^2, i-1, t-1]]]]; a[n_] := b[n, Sqrt[n] // Floor, 3]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Oct 10 2015, after Alois P. Heinz *)
PROG
(PARI) A025442(n)={sum(x=1, sqrtint(n\3), sum(y=x+1, sqrtint((n-1-x^2)\2), issquare(n-x^2-y^2)))} \\ - M. F. Hasler, Feb 03 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved