%I M4821 #68 Feb 24 2025 18:04:25
%S 1,12,6,24,12,24,8,48,6,36,24,24,24,72,0,48,12,48,30,72,24,48,24,48,8,
%T 84,24,96,48,24,0,96,6,96,48,48,36,120,24,48,24,48,48,120,24,120,0,96,
%U 24,108,30,48,72,72,32,144,0,96,72,72,48,120,0,144,12,48,48,168,48,96
%N Theta series of face-centered cubic (f.c.c.) lattice.
%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%C Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).
%D J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 113.
%D L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 263.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D N. J. A. Sloane and B. K. Teo, Theta series and magic numbers for close-packed spherical clusters, J. Chem. Phys. 83 (1985) 6520-6534.
%D L. V. Woodcock, Nature, Jan 09 1997, pp. 141-143.
%H N. J. A. Sloane, <a href="/A004015/b004015.txt">Table of n, a(n) for n = 0..9999</a>
%H G. Nebe and N. J. A. Sloane, <a href="http://www.math.rwth-aachen.de/~Gabriele.Nebe/LATTICES/D3.html">Home page for this lattice</a>
%H N. J. A. Sloane, <a href="/A000292/a000292a.jpg">A portion of the f.c.c. lattice packing.</a>
%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ThetaSeries.html">Theta Series</a>
%H <a href="/index/Fa#fcc">Index entries for sequences related to f.c.c. lattice</a>
%F Expansion of phi(q^2)^3 + 12 * q * phi(q^2) * psi(q^4)^2 in powers of q where phi(), psi() are Ramanujan theta functions. - _Michael Somos_, Oct 25 2006
%F Expansion of (phi(q)^3 + phi(-q)^3) / 2 in powers of q^2 where phi() is a Ramanujan theta function. - _Michael Somos_, Oct 25 2006
%F Expansion of b(q) * phi(q^18) + c(q^3) * phi(q^2) in powers of q^3 where b(), c() are cubic AGM theta functions and phi() is a Ramanujan theta function. - _Michael Somos_, Oct 25 2006
%F Expansion of (theta_3(q)^3 + theta_4(q)^3) / 2 in powers of q^2.
%F G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 2^(7/2) (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A004013.
%F a(n) = A005875(2*n).
%F G.f.: Sum_{i, j, k in Z} x^( i*i + j*j + k*k + i*j + i*k + j*k ). - _Michael Somos_, Jan 02 2012
%F From _Michael Somos_, Jan 05 2012: (Start)
%F Number of integer solutions to x^2 + y^2 + z^2 + x*y + x*z + y*z = n.
%F Number of integer solutions to x + y + z even and x^2 + y^2 + z^2 = 2 * n.
%F Number of integer solutions to x + y + z + w = 0 and x^2 + y^2 + z^2 + w^2 = 2 * n. (End)
%F a(2*n) = A005875(n). a(2*n+1) = 12 * A045828(n). - _Michael Somos_, Dec 28 2017
%e G.f. = 1 + 12*x + 6*x^2 + 24*x^3 + 12*x^4 + 24*x^5 + 8*x^6 + 48*x^7 + 6*x^8 + ...
%e G.f. = 1 + 12*q^2 + 6*q^4 + 24*q^6 + 12*q^8 + 24*q^10 + 8*q^12 + 48*q^14 + 6*q^16 + ...
%e From _Michael Somos_, Jan 05 2012: (Start)
%e a(2) = 6 since (1, -1, -1) is a solution to x^2 + y^2 + z^2 + x*y + x*z + y*z = 2 and the other 5 solutions are permutations and negations of this one.
%e a(2) = 6 since (1, 1, -1, -1) is a solution to x + y + z + w = 0 and x^2 + y^2 + z^2 + w^2 = 4 and the other 5 solutions are permutations of this one. (End)
%p maxd := 201: temp0 := trunc(evalf(sqrt(maxd)))+2: a := 0: for i from -temp0 to temp0 do a := a+q^( (i+1/2)^2): od: th2 := series(a,q,maxd); a := 0: for i from -temp0 to temp0 do a := a+q^(i^2): od: th3 := series(a,q,maxd); th4 := series(subs(q=-q, th3),q,maxd); series((1/2)*(th3^3+th4^3),q,200);
%t a[n_] := SquaresR[3, 2n]; Table[a[n], {n, 0, 69}] (* _Jean-François Alcover_, Jul 12 2012 *)
%t a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q]^3 + EllipticTheta[ 4, 0, q]^3) / 2, {q, 0, 2 n}]; (* _Michael Somos_, May 24 2013 *)
%t a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q^2]^3 + 12 q QPochhammer[ q^4]^3 QPochhammer[ q^8]^2 / QPochhammer[ q^2]^2, {q, 0, n}]; (* _Michael Somos_, Nov 13 2014 *)
%t SquaresR[3,2*Range[0,70]] (* _Harvey P. Dale_, Jun 01 2015 *)
%o (PARI) {a(n) = if( n<0, 0, n*=2; polcoeff( sum( k=1, sqrtint(n), 2 * x^k^2, 1 + x * O(x^n))^3, n))}; /* _Michael Somos_, Oct 25 2006 */
%o (PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^4 + A)^5 / eta(x^2 + A)^2 / eta(x^8 + A)^2)^3 + 12 * x * eta(x^4 + A)^3 * eta(x^8 + A)^2 / eta(x^2 + A)^2, n))}; /* _Michael Somos_, May 17 2008 */
%o (PARI) {a(n) = if( n<1, n==0, 2 * qfrep( [2, 1, 1; 1, 2, 1; 1, 1, 2], n, 1)[n])}; /* _Michael Somos_, Jan 02 2012 */
%o (Magma) L := Lattice("A",3); A<q> := ThetaSeries(L, 140); A; /* _Michael Somos_, Nov 13 2014 */
%o (Magma) A := Basis( ModularForms( Gamma1(8), 3/2), 70); A[1] + 12*A[2] + 6*A[3] + 24*A[4]; /* _Michael Somos_, Sep 08 2018 */
%o (Python)
%o from math import prod, isqrt
%o from sympy import factorint
%o def A004018(n): return prod(1 if p==2 else (e+1 if p&3==1 else (e+1)&1) for p, e in factorint(n).items())<<2 if n else 1
%o def A004015(n): return A004018(m:=n<<1)+(sum(A004018(m-k**2) for k in range(1,isqrt(m)+1))<<1) # _Chai Wah Wu_, Feb 24 2025
%Y Cf. A004013, A005875, A005901, A045828. A055039 gives the positions of the 0's in this sequence.
%Y Cf. A000007, A000122, A004016, A008444, A008445, A008446, A008447, A008448, A008449 (Theta series of lattices A_0, A_1, A_2, A_4, ...)
%K nonn,easy,nice
%O 0,2
%A _N. J. A. Sloane_