%I #19 Jul 11 2024 04:01:13
%S 0,6,30,54,78,198,342,342,438,708,948,1212,1308,1620,2292,2292,2388,
%T 3204,3852,4308,4788,5796,6324,6324,6900,7650,9522,10386,10386,12474,
%U 13914,13914,14298,15882,17514,19194,20274,21162,23898,23898,24858,28794,30810,31842,32898,36138,38346,38346
%N a(n) = Sum_{i,j,k in Z and i^2 + j^2 + k^2 <= n} i^2 + j^2 + k^2.
%D J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 107.
%F G.f.: (x/(1-x)) * d/dx(theta_3(x)^3). - _Seiichi Manyama_, Jul 11 2024
%e Take n=3 say. The sum contains the terms 0 (once) from (0,0,0); 1 (6 times) from (+-1,0,0); 2 (12 times) from (+-1, +-1, 0); and 3 (8 times) from (+-1, +-1, +-1); for a total of 0+6+24+24=54.
%o (PARI) my(N=50, x='x+O('x^N)); concat(0, Vec(x/(1-x)*deriv((1+2*sum(k=1, sqrtint(N), x^k^2))^3))) \\ _Seiichi Manyama_, Jul 11 2024
%Y Cf. A000122, A005875.
%K nonn
%O 0,2
%A E.V. Flynn (evflynn(AT)liverpool.ac.uk)
%E More terms from _James A. Sellers_, Feb 05 2000