%I #17 May 13 2013 01:54:18
%S 1,3,3,6,3,9,6,9,3,15,9,12,6,15,9,24,3,18,15,18,9,36,12,21,6,27,15,42,
%T 9,27,24,27,3,51,18,39,15,33,18,54,9,36,36,36,12,69,21,39,6,51,27,69,
%U 15,45,42,54,9,81,27,48,24,51,27,117,3,63,51,54,18,96,39,57,15,60,33,102,18,90,54,63,9,123,36,66,36,78,36,114,12,72,69,93,21,126,39,84,6,78,51,168,27
%N Number of solutions to n^2 = a^2 + b^2 + c^2 with nonnegative a, b, c.
%H Paul D. Hanna and Charles R Greathouse IV, <a href="/A181788/b181788.txt">Table of n, a(n) for n = 0..1000</a>
%F G.f.: [x^(n^2)] G(x)^3 where G(x) = Sum_{k>=0} x^(k^2); the notation [x^(n^2)] G(x)^3 denotes the coefficient of x^(n^2) in G(x)^3. [From _Paul D. Hanna_, Apr 20 2012]
%t nn=100; t=Table[0,{nn}]; Do[n=Sqrt[a^2+b^2+c^2]; If[n<=nn && IntegerQ[n], t[[n]]++], {a,0,nn}, {b,0,nn}, {c,0,nn}]; Prepend[t,1]
%o (PARI) {a(n)=local(G=sum(k=0,n,x^(k^2)+x*O(x^(n^2))));polcoeff(G^3,n^2)} /* _Paul D. Hanna_ */
%o (PARI) A(n)=my(G=sum(k=0,n,x^(k^2),x*O(x^(n^2)))^3); vector(n+1, k, polcoeff(G,(k-1)^2)) \\ _Charles R Greathouse IV_, Apr 20 2012
%Y Cf. A016725, A016727, A181786, A181787.
%K nonn
%O 0,2
%A _T. D. Noe_, Nov 12 2010
|