OFFSET
0,8
LINKS
FORMULA
G.f.: (Sum_{m>=1} x^(m^2))^4.
a(n) = ( A000118(n) - 4*A005875(n) + 6*A004018(n) - 4*A000122(n) + A000007(n) )/16. - Max Alekseyev, Sep 29 2012
G.f.: ((theta_3(q) - 1)/2)^4, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Aug 08 2018
MATHEMATICA
r[n_] := Reduce[ w > 0 && x > 0 && y > 0 && z > 0 && w^2 + x^2 + y^2 + z^2 == n, {w, x, y, z}, Integers]; a[n_] := Which[rn = r[n]; rn === False, 0, Head[rn] === Or, Length[rn], True, 1]; Table[a[n], {n, 0, 72}] (* Jean-François Alcover, Jul 22 2013 *)
a[n_ ] := Length[FindInstance[{n == w^2 + x^2 + y^2 + z^2, w > 0, x > 0, y > 0, z > 0}, {w, x, y, z}, Integers, 10^18]]; (* Michael Somos, Jun 23 2023 *)
PROG
(PARI) seq(n)=Vec((sum(k=1, sqrtint(n), x^(k^2)) + O(x*x^n))^4 + O(x*x^n), -(n+1)) \\ Andrew Howroyd, Aug 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 23 2001
STATUS
approved