cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A004015 Theta series of face-centered cubic (f.c.c.) lattice.

This page as a plain text file.
%I A004015 M4821 #74 Aug 29 2025 15:04:08
%S A004015 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 A004015 84,24,96,48,24,0,96,6,96,48,48,36,120,24,48,24,48,48,120,24,120,0,96,
%U A004015 24,108,30,48,72,72,32,144,0,96,72,72,48,120,0,144,12,48,48,168,48,96
%N A004015 Theta series of face-centered cubic (f.c.c.) lattice.
%C A004015 Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%C A004015 Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).
%D A004015 J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 113.
%D A004015 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 A004015 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A004015 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 A004015 L. V. Woodcock, Nature, Jan 09 1997, pp. 141-143.
%H A004015 N. J. A. Sloane, <a href="/A004015/b004015.txt">Table of n, a(n) for n = 0..9999</a>
%H A004015 Charles L. Hohn, <a href="/A004015/a004015.gif">a(0) to a(15), animated</a>
%H A004015 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 A004015 N. J. A. Sloane, <a href="/A000292/a000292a.jpg">A portion of the f.c.c. lattice packing.</a>
%H A004015 Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>
%H A004015 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>
%H A004015 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ThetaSeries.html">Theta Series</a>
%H A004015 <a href="/index/Fa#fcc">Index entries for sequences related to f.c.c. lattice</a>
%F A004015 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 A004015 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 A004015 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 A004015 Expansion of (theta_3(q)^3 + theta_4(q)^3) / 2 in powers of q^2.
%F A004015 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 A004015 a(n) = A005875(2*n).
%F A004015 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 A004015 From _Michael Somos_, Jan 05 2012: (Start)
%F A004015 Number of integer solutions to x^2 + y^2 + z^2 + x*y + x*z + y*z = n.
%F A004015 Number of integer solutions to x + y + z even and x^2 + y^2 + z^2 = 2 * n.
%F A004015 Number of integer solutions to x + y + z + w = 0 and x^2 + y^2 + z^2 + w^2 = 2 * n. (End)
%F A004015 a(2*n) = A005875(n). a(2*n+1) = 12 * A045828(n). - _Michael Somos_, Dec 28 2017
%e A004015 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 A004015 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 A004015 From _Michael Somos_, Jan 05 2012: (Start)
%e A004015 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 A004015 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 A004015 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 A004015 a[n_] := SquaresR[3, 2n]; Table[a[n], {n, 0, 69}] (* _Jean-François Alcover_, Jul 12 2012 *)
%t A004015 a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q]^3 + EllipticTheta[ 4, 0, q]^3) / 2, {q, 0, 2 n}]; (* _Michael Somos_, May 24 2013 *)
%t A004015 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 A004015 SquaresR[3,2*Range[0,70]] (* _Harvey P. Dale_, Jun 01 2015 *)
%o A004015 (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 A004015 (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 A004015 (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 A004015 (Magma) L := Lattice("A",3); A<q> := ThetaSeries(L, 140); A; /* _Michael Somos_, Nov 13 2014 */
%o A004015 (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 A004015 (Python)
%o A004015 from math import prod, isqrt
%o A004015 from sympy import factorint
%o A004015 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 A004015 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 A004015 Cf. A004013, A005875, A005901, A045828. A055039 gives the positions of the 0's in this sequence.
%Y A004015 Cf. A000007, A000122, A004016, A008444, A008445, A008446, A008447, A008448, A008449 (Theta series of lattices A_0, A_1, A_2, A_4, ...)
%K A004015 nonn,easy,nice,changed
%O A004015 0,2
%A A004015 _N. J. A. Sloane_