OFFSET
0,7
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: (Sum_{m>=1} x^(m^2))^3.
EXAMPLE
a(5)=0;
a(6)=3 because 1^2+1^2+2^2 = 1^2+2^2+1^2 = 2^2+1^2+1^2 = 6;
a(27)=4 because 1^2+1^2+5^2 = 1^2+5^2+1^2 = 3^2+3^2+3^2 = 5^2+1^2+1^2 = 27.
MATHEMATICA
r[n_] := Reduce[ x>0 && y>0 && z>0 && x^2 + y^2 + z^2 == n, {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, 89}](* Jean-François Alcover, May 10 2012 *)
(EllipticTheta[3, 0, x] - 1)^3/8 + O[x]^100 // CoefficientList[#, x]& (* Jean-François Alcover, Jul 30 2017 *)
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Andrew A. Doroshev (andy(AT)ip.rsu.ru), Aug 23 2001
STATUS
approved