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.

Showing 1-5 of 5 results.

A000122 Expansion of Jacobi theta function theta_3(x) = Sum_{m =-oo..oo} x^(m^2) (number of integer solutions to k^2 = n).

Original entry on oeis.org

1, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (the present sequence), psi(q) (A010054), chi(q) (A000700).
Theta series of the one-dimensional lattice Z.
Also, essentially the same as the theta series of the one-dimensional lattices A_1, A*_1, D_1, D*_1.
Number of ways of writing n as a square.
Closely related: theta_4(x) = Sum_{m = -oo..oo} (-x)^(m^2). See A002448.
Number 6 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - Michael Somos, May 04 2016

Examples

			G.f. = 1 + 2*q + 2*q^4 + 2*q^9 + 2*q^16 + 2*q^25 + 2*q^36 + 2*q^49 + 2*q^64 + 2*q^81 + ...
		

References

  • Tom M. Apostol, Modular Functions and Dirichlet Series in Number Theory, Second edition, Springer, 1990, Exercise 1, p. 91.
  • Richard Bellman, A Brief Introduction to Theta Functions, Dover, 2013.
  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 64.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 104, [5n].
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
  • N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 93, Eq. (34.1); p. 78, Eq. (32.22).
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 133.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Sixth Edition, Clarendon Press, Oxford, 2009, Theorem 352, p. 372.
  • J. Tannery and J. Molk, Eléments de la Théorie des Fonctions Elliptiques, Vol. 2, Gauthier-Villars, Paris, 1902; Chelsea, NY, 1972, see p. 27.
  • E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.

Crossrefs

1st column of A286815. - Seiichi Manyama, May 27 2017
Row d=1 of A122141.
Cf. A002448 (theta_4). Partial sums give A001650.
Cf. A000007, A004015, A004016, A008444, A008445, A008446, A008447, A008448, A008449 (Theta series of lattices A_0, A_3, A_2, A_4, ...).

Programs

  • Julia
    using Nemo
    function JacobiTheta3(len, r)
        R, x = PolynomialRing(ZZ, "x")
        e = theta_qexp(r, len, x)
        [fmpz(coeff(e, j)) for j in 0:len - 1] end
    A000122List(len) = JacobiTheta3(len, 1)
    A000122List(105) |> println # Peter Luschny, Mar 12 2018
    
  • Magma
    Basis( ModularForms( Gamma0(4), 1/2), 100) [1]; /* Michael Somos, Jun 10 2014 */
    
  • Magma
    L := Lattice("A",1); A := ThetaSeries(L, 20); A; /* Michael Somos, Nov 13 2014 */
    
  • Maple
    add(x^(m^2),m=-10..10): seq(coeff(%,x,n), n=0..100);
    # alternative
    A000122 := proc(n)
        if n = 0 then
            1;
        elif issqr(n) then
            2;
        else
            0 ;
        end if;
    end proc:
    seq(A000122(n),n=0..100) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q], {q, 0, n}]; (* Michael Somos, Jul 11 2011 *)
    CoefficientList[ Sum[ x^(m^2), {m, -(n=10), n} ], x ]
    SquaresR[1, Range[0, 104]] (* Robert G. Wilson v, Jul 16 2014 *)
    QP = QPochhammer; s = QP[q^2]^5/(QP[q]*QP[q^4])^2 + O[q]^105; CoefficientList[s, q] (* Jean-François Alcover, Nov 24 2015 *)
    (4 QPochhammer[q^2]/QPochhammer[-1,-q]^2 + O[q]^101)[[3]] (* Vladimir Reshetnikov, Sep 16 2016 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^5 / (eta(x + A) * eta(x^4 + A))^2, n))}; /* Michael Somos, Mar 14 2011 */
    
  • PARI
    {a(n) = issquare(n) * 2 -(n==0)}; /* Michael Somos, Jun 17 1999 */
    
  • Python
    from sympy.ntheory.primetest import is_square
    def A000122(n): return is_square(n)<<1 if n else 1 # Chai Wah Wu, May 17 2023
  • Sage
    Q = DiagonalQuadraticForm(ZZ, [1])
    Q.representation_number_list(105) # Peter Luschny, Jun 20 2014
    

Formula

Expansion of eta(q^2)^5 / (eta(q)*eta(q^4))^2 in powers of q.
Euler transform of period 4 sequence [2, -3, 2, -1, ...].
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - v^2 + 2 * w * (w - u). - Michael Somos, Jul 20 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^3), A(x^9)) where f(u, v, w) = w^4 - v^4 + w * (u - w)^3. - Michael Somos, May 11 2019
G.f.: Sum_{m=-oo..oo} x^(m^2);
a(0) = 1; for n > 0, a(n) = 0 unless n is a square when a(n) = 2.
G.f.: Product_{k>0} (1 - x^(2*k))*(1 + x^(2*k-1))^2.
G.f.: s(2)^5/(s(1)^2*s(4)^2), where s(k) := subs(q=q^k, eta(q)), where eta(q) is Dedekind's function, cf. A010815. [Fine]
The Jacobi triple product identity states that for |x| < 1, z != 0, Product_{n>0} {(1-x^(2n))(1+x^(2n-1)z)(1+x^(2n-1)/z)} = Sum_{n=-inf..inf} x^(n^2)*z^n. Set z=1 to get theta_3(x).
For n > 0, a(n) = 2*(floor(sqrt(n))-floor(sqrt(n-1))). - Mikael Aaltonen, Jan 17 2015
G.f. is a period 1 Fourier series which satisfies f(-1/(4 t)) = 2^(1/2) (t/i)^(1/2) f(t) where q = exp(2 Pi i t). - Michael Somos, May 05 2016
a(n) = A000132(n)(mod 4). - John M. Campbell, Jul 07 2016
a(n) = (2/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
a(n) = 2 * A010052(n) if n>0. a(3*n + 1) = 2 * A089801(n). a(3*n + 2) = 0. a(4*n) = a(n). a(4*n + 2) = a(4*n + 3) = 0. a(8*n + 1) = 2 * A010054(n). - Michael Somos, May 11 2019
Dirichlet g.f.: 2*zeta(2s). - Francois Oger, Oct 26 2019 [Corrected by Sean A. Irvine, Nov 26 2024]
G.f. appears to equal exp( 2*Sum_{n >= 0} x^(2*n+1)/((2*n+1)*(1 + x^(2*n+1))) ). - Peter Bala, Dec 23 2021
From Peter Bala, Sep 27 2023: (Start)
G.f. A(x) satisfies A(x)*A(-x) = A(-x^2)^2.
A(x) = Sum_{n >= 1} x^(n-1)*Product_{k >= n} 1 - (-x)^k.
A(x)^2 = 1 + 4*Sum_{n >= 1} (-1)^(n+1)*x^(2*n-1)/(1 - x^(2*n-1)), which gives the number of representations of an integer as a sum of two squares. See, for example, Fine, 26.63.
A(x) = 1 + 2*Sum_{n >= 1} x^(n*(n+1)/2) * ( Product_{k = 1..n-1} 1 + x^k ) /( Product_{k = 1..n} 1 + x^(2*k) ). See Fine, equation 14.43. (End)

A004016 Theta series of planar hexagonal lattice A_2.

Original entry on oeis.org

1, 6, 0, 6, 6, 0, 0, 12, 0, 6, 0, 0, 6, 12, 0, 0, 6, 0, 0, 12, 0, 12, 0, 0, 0, 6, 0, 6, 12, 0, 0, 12, 0, 0, 0, 0, 6, 12, 0, 12, 0, 0, 0, 12, 0, 0, 0, 0, 6, 18, 0, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 12, 0, 12, 6, 0, 0, 12, 0, 0, 0, 0, 0, 12, 0, 6, 12, 0, 0, 12, 0
Offset: 0

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.
a(n) is the number of integer solutions to x^2 + x*y + y^2 = n (or equivalently x^2 - x*y + y^2 = n). - Michael Somos, Sep 20 2004
a(n) is the number of integer solutions to x^2 + y^2 + z^2 = 2*n where x + y + z = 0. - Michael Somos, Mar 12 2012
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cubic AGM theta functions: a(q) (the present sequence), b(q) (A005928), c(q) (A005882).
a(n) = 6*A002324(n) if n>0, and A002324 is multiplicative, thus a(1)*a(m*n) = a(n)*a(m) if n>0, m>0 are relatively prime. - Michael Somos, Mar 17 2019
The first occurrence of a(n)= 6, 12, 18, 24, ... (multiples of 6) is at n= 1, 7, 49, 91, 2401, 637, 117649, ... (see A002324). - R. J. Mathar, Sep 21 2024

Examples

			G.f. = 1 + 6*x + 6*x^3 + 6*x^4 + 12*x^7 + 6*x^9 + 6*x^12 + 12*x^13 + 6*x^16 + ...
Theta series of A_2 on the standard scale in which the minimal norm is 2:
1 + 6*q^2 + 6*q^6 + 6*q^8 + 12*q^14 + 6*q^18 + 6*q^24 + 12*q^26 + 6*q^32 + 12*q^38 + 12*q^42 + 6*q^50 + 6*q^54 + 12*q^56 + 12*q^62 + 6*q^72 + 12*q^74 + 12*q^78 + 12*q^86 + 6*q^96 + 18*q^98 + 12*q^104 + 12*q^114 + 12*q^122 + 12*q^126 + 6*q^128 + 12*q^134 + 12*q^146 + 6*q^150 + 12*q^152 + 12*q^158 + ...
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 171, Entry 28.
  • Harvey Cohn, Advanced Number Theory, Dover Publications, Inc., 1980, p. 89. Ex. 18.
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 111.
  • M. N. Huxley, Area, Lattice Points and Exponential Sums, Oxford, 1996; p. 236.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See also A035019.
Cf. A000007, A000122, A004015, A008444, A008445, A008446, A008447, A008448, A008449 (Theta series of lattices A_0, A_1, A_3, A_4, ...), A186706.

Programs

  • Magma
    Basis( ModularForms( Gamma1(3), 1), 81) [1]; /* Michael Somos, May 27 2014 */
    
  • Magma
    L := Lattice("A",2); A := ThetaSeries(L, 161); A; /* Michael Somos, Nov 13 2014 */
    
  • Maple
    A004016 := proc(n)
        local a,j ;
        a := A033716(n) ;
        for j from 0 to n/3 do
            a := a+A089800(n-1-3*j)*A089800(j) ;
        end do:
        a;
    end proc:
    seq(A004016(n),n=0..49) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    a[ n_] := If[ n < 1, Boole[ n == 0 ], 6 DivisorSum[ n, KroneckerSymbol[ #, 3] &]]; (* Michael Somos, Nov 08 2011 *)
    a[ n_] := SeriesCoefficient[ (QPochhammer[ q]^3 + 9 q QPochhammer[ q^9]^3) / QPochhammer[ q^3], {q, 0, n}]; (* Michael Somos, Nov 13 2014 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q] EllipticTheta[ 3, 0, q^3] + EllipticTheta[ 2, 0, q] EllipticTheta[ 2, 0, q^3], {q, 0, n}]; (* Michael Somos, Nov 13 2014 *)
    a[ n_] := Length @ FindInstance[ x^2 + x y + y^2 == n, {x, y}, Integers, 10^9]; (* Michael Somos, Sep 14 2015 *)
    terms = 81; f[q_] = LatticeData["A2", "ThetaSeriesFunction"][-I Log[q]/Pi]; s = Series[f[q], {q, 0, 2 terms}]; CoefficientList[s, q^2][[1 ;; terms]] (* Jean-François Alcover, Jul 04 2017 *)
  • PARI
    {a(n) = my(A, p, e); if( n<1, n==0, A = factor(n); 6 * prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==3, 1, p%3==1, e+1, 1-e%2)))}; /* Michael Somos, May 20 2005 */ /* Editor's note: this is the most efficient program */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 + 6 * sum( k=1,n, x^k / (1 + x^k + x^(2*k)), x * O(x^n)), n))}; /* Michael Somos, Oct 06 2003 */
    
  • PARI
    {a(n) = if( n<1, n==0, 6 * sumdiv( n,d, kronecker( d, 3)))}; /* Michael Somos, Mar 16 2005 */
    
  • PARI
    {a(n) = if( n<1, n==0, 6 * sumdiv( n,d, (d%3==1) - (d%3==2)))}; /* Michael Somos, May 20 2005 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, n*=3; A = x * O(x^n); polcoeff( (eta(x + A)^3  + 3 * x * eta(x^9 + A)^3) / eta(x^3 + A), n))}; /* Michael Somos, May 20 2005 */
    
  • PARI
    {a(n) = if( n<1, n==0, qfrep([ 2, 1; 1, 2], n, 1)[n] * 2)}; /* Michael Somos, Jul 16 2005 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 + 6 * sum( k=1, n, x^(3*k - 2) / (1 - x^(3*k - 2)) - x^(3*k - 1) / (1 - x^(3*k - 1)), x * O(x^n)), n))} /* Paul D. Hanna, Jul 03 2011 */
    
  • Python
    from math import prod
    from sympy import factorint
    def A004016(n): return 6*prod(e+1 if p%3==1 else int(not e&1) for p, e in factorint(n).items() if p != 3) if n else 1 # Chai Wah Wu, Nov 17 2022
  • Sage
    ModularForms( Gamma1(3), 1, prec=81).0 ; # Michael Somos, Jun 04 2013
    

Formula

Expansion of a(q) in powers of q where a(q) is the first cubic AGM theta function.
Expansion of theta_3(q) * theta_3(q^3) + theta_2(q) * theta_2(q^3) in powers of q.
Expansion of phi(x) * phi(x^3) + 4 * x * psi(x^2) * psi(x^6) in powers of x where phi(), psi() are Ramanujan theta functions.
Expansion of (1 / Pi) integral_{0 .. Pi/2} theta_3(z, q)^3 + theta_4(z, q)^3 dz in powers of q^2. - Michael Somos, Jan 01 2012
Expansion of coefficient of x^0 in f(x * q, q / x)^3 in powers of q^2 where f(,) is Ramanujan's general theta function. - Michael Somos, Jan 01 2012
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - 3*v^2 - 2*u*w + 4*w^2. - Michael Somos, Jun 11 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^3), A(x^6)) where f(u1, u2, u3, u6) = (u1-u3) * (u3-u6) - (u2-u6)^2. - Michael Somos, May 20 2005
G.f. is a period 1 Fourier series which satisfies f(-1 / (3 t)) = 3^(1/2) (t/i) f(t) where q = exp(2 Pi i t). - Michael Somos, Sep 11 2007
G.f. A(x) satisfies A(x) + A(-x) = 2 * A(x^4), from Ramanujan.
G.f.: 1 + 6 * Sum_{k>0} x^k / (1 + x^k + x^(2*k)). - Michael Somos, Oct 06 2003
G.f.: Sum_( q^(n^2+n*m+m^2) ) where the sum (for n and m) extends over the integers. - Joerg Arndt, Jul 20 2011
G.f.: theta_3(q) * theta_3(q^3) + theta_2(q) * theta_2(q^3) = (eta(q^(1/3))^3 + 3 * eta(q^3)^3) / eta(q).
G.f.: 1 + 6*Sum_{n>=1} x^(3*n-2)/(1-x^(3*n-2)) - x^(3*n-1)/(1-x^(3*n-1)). - Paul D. Hanna, Jul 03 2011
a(3*n + 2) = 0, a(3*n) = a(n), a(3*n + 1) = 6 * A033687(n). - Michael Somos, Jul 16 2005
a(2*n + 1) = 6 * A033762(n), a(4*n + 2) = 0, a(4*n) = a(n), a(4*n + 1) = 6 * A112604(n), a(4*n + 3) = 6 * A112595(n). - Michael Somos, May 17 2013
a(n) = 6 * A002324(n) if n>0. a(n) = A005928(3*n).
Euler transform of A192733. - Michael Somos, Mar 12 2012
a(n) = (-1)^n * A180318(n). - Michael Somos, Sep 14 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2*Pi/sqrt(3) = 3.627598... (A186706). - Amiram Eldar, Oct 15 2022

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

Original entry on oeis.org

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, 84, 24, 96, 48, 24, 0, 96, 6, 96, 48, 48, 36, 120, 24, 48, 24, 48, 48, 120, 24, 120, 0, 96, 24, 108, 30, 48, 72, 72, 32, 144, 0, 96, 72, 72, 48, 120, 0, 144, 12, 48, 48, 168, 48, 96
Offset: 0

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cubic AGM theta functions: a(q) (see A004016), b(q) (A005928), c(q) (A005882).

Examples

			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 + ...
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 + ...
From _Michael Somos_, Jan 05 2012: (Start)
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.
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)
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 113.
  • 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.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • 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.
  • L. V. Woodcock, Nature, Jan 09 1997, pp. 141-143.

Crossrefs

Cf. A004013, A005875, A005901, A045828. A055039 gives the positions of the 0's in this sequence.
Cf. A000007, A000122, A004016, A008444, A008445, A008446, A008447, A008448, A008449 (Theta series of lattices A_0, A_1, A_2, A_4, ...)

Programs

  • Magma
    L := Lattice("A",3); A := ThetaSeries(L, 140); A; /* Michael Somos, Nov 13 2014 */
    
  • 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 */
    
  • Maple
    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);
  • Mathematica
    a[n_] := SquaresR[3, 2n]; Table[a[n], {n, 0, 69}] (* Jean-François Alcover, Jul 12 2012 *)
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, q]^3 + EllipticTheta[ 4, 0, q]^3) / 2, {q, 0, 2 n}]; (* Michael Somos, May 24 2013 *)
    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 *)
    SquaresR[3,2*Range[0,70]] (* Harvey P. Dale, Jun 01 2015 *)
  • 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 */
    
  • 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 */
    
  • 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 */
    
  • Python
    from math import prod, isqrt
    from sympy import factorint
    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
    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

Formula

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
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
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
Expansion of (theta_3(q)^3 + theta_4(q)^3) / 2 in powers of q^2.
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.
a(n) = A005875(2*n).
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
From Michael Somos, Jan 05 2012: (Start)
Number of integer solutions to x^2 + y^2 + z^2 + x*y + x*z + y*z = n.
Number of integer solutions to x + y + z even and x^2 + y^2 + z^2 = 2 * n.
Number of integer solutions to x + y + z + w = 0 and x^2 + y^2 + z^2 + w^2 = 2 * n. (End)
a(2*n) = A005875(n). a(2*n+1) = 12 * A045828(n). - Michael Somos, Dec 28 2017

A008444 Theta series of A_4 lattice.

Original entry on oeis.org

1, 20, 30, 60, 60, 120, 40, 180, 150, 140, 130, 240, 180, 360, 120, 260, 220, 480, 210, 400, 360, 240, 360, 660, 200, 620, 240, 600, 540, 600, 240, 640, 630, 720, 320, 780, 420, 1080, 600, 480, 650, 840, 360, 1260, 720, 840, 440, 1380, 660, 860, 630, 640, 1080, 1560, 400
Offset: 0

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + 20*x + 30*x^2 + 60*x^3 + 60*x^4 + 120*x^5 + 40*x^6 + 180*x^7 + ...
G.f. = 1 + 20*q^2 + 30*q^4 + 60*q^6 + 60*q^8 + 120*q^10 + 40*q^12 + 180*q^14 + 150*q^16 + 140*q^18 + 130*q^20 + 240*q^22 + 180*q^24 + 360*q^26 + 120*q^28 + 260*q^30 + 220*q^32 + 480*q^34 + 210*q^36 + 400*q^38 + 360*q^40 + 240*q^42 + 360*q^44 + 660*q^46 + 200*q^48 + 620*q^50 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 110.

Crossrefs

Cf. A000007, A000122, A004016, A004015, A008445, A008446, A008447, A008448, A008449 (Theta series of lattices A_0, A_1, A_2, A_3, A_5, ...).

Programs

  • Magma
    L := Lattice("A", 4); A := ThetaSeries(L, 120); A;
    
  • Magma
    A := Basis( ModularForms( Gamma1(5), 2), 55) ; A[1] + 20*A[2] + 30*A[3]; /* Michael Somos, Nov 13 2014 */
  • Mathematica
    a[ n_] := With[ {u1 = QPochhammer[ x], u5 = QPochhammer[ x^5]}, SeriesCoefficient[ u1^5/u5 + 25 x u5^5/u1, {x, 0, n}]]; (* Michael Somos, Nov 13 2014 *)
    terms = 55; f[q_] = LatticeData["A4", "ThetaSeriesFunction"][-I Log[q]/Pi]; s = Series[f[q], {q, 0, 2 terms}]; CoefficientList[s, q^2][[1 ;; terms]] (* Jean-François Alcover, Jul 04 2017 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A)^5 / eta(x^5 + A) + 25 * x * eta(x^5 + A)^5 / eta(x + A), n))}; /* Michael Somos, Feb 06 2011 */
    

Formula

Expansion of f(-x)^5 / f(-x^5) + 25 * x * f(-x^5)^5 / f(-x) in powers of x where f() is a Ramanujan theta function. - Michael Somos, Feb 06 2011
Expansion of (1 / Pi) integral_{0 .. Pi/2} theta_3(z, q)^5 + theta_4(z, q)^5 dz in powers of q^2. - Michael Somos, Jan 01 2012
Coefficient of x^0 in the expansion f(x * q, q / x)^5 in powers of q^2 where f() is a Ramanujan theta function. - Michael Somos, Jan 01 2012
G.f. is a period 1 Fourier series which satisfies f(-1 / (5 t)) = 5^(3/2) (t/i)^2 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A023916. - Michael Somos, Feb 06 2011
A023916(5*n) = a(n) for all n in Z.

A125564 Theta series of 5-dimensional lattice A_5^{+3}.

Original entry on oeis.org

1, 0, 30, 30, 0, 132, 90, 0, 270, 140, 0, 420, 270, 0, 600, 360, 0, 840, 330, 0, 1092, 660, 0, 1200, 810, 0, 1500, 570, 0, 1980, 1020, 0, 2190, 1260, 0, 2280, 1100, 0, 2460, 1560, 0, 3360, 1620, 0, 3780, 1452, 0, 3360, 2190, 0, 3930, 2340, 0, 4620, 1710, 0, 5400, 2940
Offset: 0

Views

Author

N. J. A. Sloane, Jan 31 2007

Keywords

Examples

			1 + 30*q^4 + 30*q^6 + 132*q^10 + 90*q^12 + 270*q^16 + 140*q^18 + 420*q^22 + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 110 and 116.

Crossrefs

Programs

  • Mathematica
    al[n_, l_, p_, nn_] := Sum[Exp[-2 Pi I k l/n] EllipticTheta[3, Pi k/n, q^p]^n, {k, n}] / n / Sum[q^(p n (m + l/n)^2), {m, -nn, nn}] + O[q]^nn;
    as[n_, s_, nn_] := CoefficientList[FullSimplify[Normal@Sum[al[n, l, n/s, nn], {l, s, n, s}]], q];
    as[6, 1, 30] (*A023917*)
    as[6, 2, 30][[;; ;; 2]] (*this sequence*)
    as[6, 3, 30] (*A125561*)
    (* Andrey Zabolotskiy, Feb 17 2022 *)

Extensions

Typo in name corrected by Andrey Zabolotskiy, Feb 16 2022
Showing 1-5 of 5 results.