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-10 of 18 results. Next

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

A005875 Theta series of simple cubic lattice; also number of ways of writing a nonnegative integer n as a sum of 3 squares (zero being allowed).

Original entry on oeis.org

1, 6, 12, 8, 6, 24, 24, 0, 12, 30, 24, 24, 8, 24, 48, 0, 6, 48, 36, 24, 24, 48, 24, 0, 24, 30, 72, 32, 0, 72, 48, 0, 12, 48, 48, 48, 30, 24, 72, 0, 24, 96, 48, 24, 24, 72, 48, 0, 8, 54, 84, 48, 24, 72, 96, 0, 48, 48, 24, 72, 0, 72, 96, 0, 6, 96, 96, 24, 48, 96, 48, 0, 36, 48, 120
Offset: 0

Views

Author

Keywords

Comments

Number of ordered triples (i, j, k) of integers such that n = i^2 + j^2 + k^2.
The Madelung Coulomb energy for alternating unit charges in the simple cubic lattice is Sum_{n>=1} (-1)^n*a(n)/sqrt(n) = -A085469. - R. J. Mathar, Apr 29 2006
a(A004215(k))=0 for k=1,2,3,... but no other elements of {a(n)} are zero. - Graeme McRae, Jan 15 2007

Examples

			Order and signs are taken into account: a(1) = 6 from 1 = (+-1)^2 + 0^2 + 0^2, a(2) = 12 from 2 = (+-1)^2 + (+-1)^2 + 0^2; a(3) = 8 from 3 = (+-1)^2 + (+-1)^2 + (+-1)^2, etc.
G.f. =  1 + 6*q + 12*q^2 + 8*q^3 + 6*q^4 + 24*q^5 + 24*q^6 + 12*q^8 + 30*q^9 + 24*q^10 + ...
		

References

  • H. Cohen, Number Theory, Vol. 1: Tools and Diophantine Equations, Springer-Verlag, 2007, p. 317.
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 107.
  • H. Davenport, The Higher Arithmetic. Cambridge Univ. Press, 7th ed., 1999, Chapter V.
  • 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. 3, p. 109.
  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985, p. 54.
  • L. Kronecker, Crelle, Vol. LVII (1860), p. 248; Werke, Vol. IV, p. 188.
  • C. J. Moreno and S. S. Wagstaff, Jr., Sums of Squares of Integers, Chapman and Hall, 2006, p. 43.
  • T. Nagell, Introduction to Number Theory, Wiley, 1951, p. 194.
  • W. Sierpiński, 1925. Teorja Liczb. pp. 1-410 (p.61).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • H. J. S. Smith, Report on the Theory of Numbers, reprinted in Vol. 1 of his Collected Math. Papers, Chelsea, NY, 1979, see p. 338, Eq. (B').

Crossrefs

Row d=3 of A122141 and of A319574, 3rd column of A286815.
Cf. A074590 (primitive solutions), A117609 (partial sums), A004215 (positions of zeros).
Analog for 4 squares: A000118.
x^2+y^2+k*z^2: A005875, A014455, A034933, A169783, A169784.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Programs

  • Julia
    # JacobiTheta3 is defined in A000122.
    A005875List(len) = JacobiTheta3(len, 3)
    A005875List(75) |> println # Peter Luschny, Mar 12 2018
    
  • Magma
    Basis( ModularForms( Gamma1(4), 3/2), 75) [1]; /* Michael Somos, Jun 25 2014 */
    
  • Maple
    (sum(x^(m^2),m=-10..10))^3; seq(coeff(%,x,n), n=0..50);
    Alternative:
    A005875list := proc(len) series(JacobiTheta3(0, x)^3, x, len+1);
    seq(coeff(%, x, j), j=0..len-1) end: A005875list(75); # Peter Luschny, Oct 02 2018
  • Mathematica
    SquaresR[3,Range[0,80]] (* Harvey P. Dale, Jul 21 2011 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^3, {q, 0, n}]; (* Michael Somos, Jun 25 2014 *)
    a[ n_] := Length @ FindInstance[ n == x^2 + y^2 + z^2, {x, y, z}, Integers, 10^9]; (* Michael Somos, May 21 2015 *)
    QP = QPochhammer; CoefficientList[(QP[q^2]^5/(QP[q]*QP[q^4])^2)^3 + O[q]^80, q] (* Jean-François Alcover, Nov 24 2015 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum( k=1, sqrtint(n), 2 * x^k^2, 1 + x * O(x^n))^3, n))};
    
  • 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)^3, n))}; /* Michael Somos, Jun 03 2012 */
    
  • PARI
    {a(n) = my(G); if( n<0, 0, G = [ 1, 0, 0; 0, 1, 0; 0, 0, 1]; polcoeff( 1 + 2 * x * Ser( qfrep( G, n)), n))}; /* Michael Somos, May 21 2015 */
    
  • Python
    # uses Python code for A004018
    from math import isqrt
    def A005875(n): return A004018(n)+(sum(A004018(n-k**2) for k in range(1,isqrt(n)+1))<<1) # Chai Wah Wu, Jun 21 2024
  • Sage
    Q = DiagonalQuadraticForm(ZZ, [1]*3)
    Q.representation_number_list(75) # Peter Luschny, Jun 20 2014
    

Formula

A number n is representable as the sum of 3 squares iff n is not of the form 4^a (8k+7) (cf. A000378).
There is a classical formula (essentially due to Gauss):
For sums of 3 squares r_3(n): write (uniquely) -n=D(2^vf)^2, with D<0 fundamental discriminant, f odd, v>=-1. Then r_3(n) = 12L((D/.),0)(1-(D/2)) Sum_{d | f} mu(d)(D/d)sigma(f/d).
Here mu is the Moebius function, (D/2) and (D/d) are Kronecker-Legendre symbols, sigma is the sum of divisors function, L((D/.),0)=h(D)/(w(D)/2) is the value at 0 of the L function of the quadratic character (D/.), equal to the class number h(D) divided by 2 or 3 in the special cases D=-4 and -3. - Henri Cohen (Henri.Cohen(AT)math.u-bordeaux1.fr), May 12 2010
a(n) = 3*T(n) if n == 1,2,5,6 mod 8, = 2*T(n) if n == 3 mod 8, = 0 if n == 7 mod 8 and = a(n/4) if n == 0 mod 4, where T(n) = A117726(n). [Moreno-Wagstaff].
"If 12E(n) is the number of representations of n as a sum of three squares, then E(n) = 2F(n) - G(n) where G(n) = number of classes of determinant -n, F(n) = number of uneven classes." - Dickson, quoting Kronecker. [Cf. A117726.]
a(n) = Sum_{d^2|n} b(n/d^2), where b() = A074590() gives the number of primitive solutions.
Expansion of phi(q)^3 in powers of q where phi() is a Ramanujan theta function. - Michael Somos, Oct 25 2006.
Euler transform of period 4 sequence [ 6, -9, 6, -3, ...]. - Michael Somos, Oct 25 2006
G.f.: (Sum_{k in Z} x^(k^2))^3.
a(8*n + 7) = 0. a(4*n) = a(n).
a(n) = A004015(2*n) = A014455(2*n) = A004013(4*n) = A169783(4*n). a(4*n + 1) = 6 * A045834(n). a(8*n + 3) = 8 * A008443(n). a(8*n + 5) = 24 * A045831(n). - Michael Somos, Jun 03 2012
a(4*n + 2) = 12 * A045828(n). - Michael Somos, Sep 03 2014
a(n) = (-1)^n * A213384(n). - Michael Somos, May 21 2015
a(n) = (6/n)*Sum_{k=1..n} A186690(k)*a(n-k), a(0) = 1. - Seiichi Manyama, May 27 2017
a(n) = A004018(n) + 2*Sum_{k=1..floor(sqrt(n))} A004018(n - k^2). - Daniel Suteu, Aug 27 2021
Convolution cube of A000122. Convolution of A004018 and A000122. - R. J. Mathar, Aug 03 2025

Extensions

More terms from James Sellers, Aug 22 2000

A005901 Number of points on surface of cuboctahedron (or icosahedron): a(0) = 1; for n > 0, a(n) = 10n^2 + 2. Also coordination sequence for f.c.c. or A_3 or D_3 lattice.

Original entry on oeis.org

1, 12, 42, 92, 162, 252, 362, 492, 642, 812, 1002, 1212, 1442, 1692, 1962, 2252, 2562, 2892, 3242, 3612, 4002, 4412, 4842, 5292, 5762, 6252, 6762, 7292, 7842, 8412, 9002, 9612, 10242, 10892, 11562, 12252, 12962, 13692, 14442, 15212, 16002
Offset: 0

Views

Author

N. J. A. Sloane, R. Vaughan

Keywords

Comments

Sequence found by reading the segment (1, 12) together with the line from 12, in the direction 12, 42, ..., in the square spiral whose vertices are the generalized heptagonal numbers A085787. - Omar E. Pol, Jul 18 2012

References

  • H. S. M. Coxeter, "Polyhedral numbers," in R. S. Cohen et al., editors, For Dirk Struik. Reidel, Dordrecht, 1974, pp. 25-35.
  • Gmelin Handbook of Inorg. and Organomet. Chem., 8th Ed., 1994, TYPIX search code (225) cF4
  • B. Grünbaum, Uniform tilings of 3-space, Geombinatorics, 4 (1994), 49-56. See tiling #1.
  • R. W. Marks and R. B. Fuller, The Dymaxion World of Buckminster Fuller. Anchor, NY, 1973, p. 46.
  • S. Rosen, Wizard of the Dome: R. Buckminster Fuller; Designer for the Future. Little, Brown, Boston, 1969, p. 109.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums give A005902.
The 28 uniform 3D tilings: cab: A299266, A299267; crs: A299268, A299269; fcu: A005901, A005902; fee: A299259, A299265; flu-e: A299272, A299273; fst: A299258, A299264; hal: A299274, A299275; hcp: A007899, A007202; hex: A005897, A005898; kag: A299256, A299262; lta: A008137, A299276; pcu: A005899, A001845; pcu-i: A299277, A299278; reo: A299279, A299280; reo-e: A299281, A299282; rho: A008137, A299276; sod: A005893, A005894; sve: A299255, A299261; svh: A299283, A299284; svj: A299254, A299260; svk: A010001, A063489; tca: A299285, A299286; tcd: A299287, A299288; tfs: A005899, A001845; tsi: A299289, A299290; ttw: A299257, A299263; ubt: A299291, A299292; bnn: A007899, A007202. See the Proserpio link in A299266 for overview.

Programs

  • Magma
    [n eq 0 select 1 else 2*(5*n^2+1): n in [0..55]]; // G. C. Greubel, May 25 2023
    
  • Mathematica
    Join[{1},10*Range[40]^2+2] (* or *) Join[{1},LinearRecurrence[{3,-3,1},{12,42,92},40]] (* Harvey P. Dale, May 28 2014 *)
  • PARI
    a(n)=if(n<0,0,10*n^2+1+(n>0))
    
  • SageMath
    [2*(5*n^2 + 1)-int(n==0) for n in range(56)] # G. C. Greubel, May 25 2023

Formula

G.f.: (1+x)*(1+8*x+x^2)/(1-x)^3. - Simon Plouffe in his 1992 dissertation
G.f. for coordination sequence for A_n lattice is (1-z)^(-n) * Sum_{i=0..n} binomial(n, i)^2*z^i. [Bacher et al.]
a(n+1) = A027599(n+2) + A092277(n+1) - Creighton Dement, Feb 11 2005
a(n) = 2 + A033583(n), n >= 1. - Omar E. Pol, Jul 18 2012
a(n) = 12 + 24*(n-1) + 8*A000217(n-2) + 6*A000290(n-1). The properties of the cuboctahedron, namely, its number of vertices (12), edges (24), and faces as well as face-type (8 triangles and 6 squares), are involved in this formula. - Peter M. Chema, Mar 26 2017
a(n) = A062786(n) + A062786(n+1). - R. J. Mathar, Feb 28 2018
E.g.f.: -1 + 2*(1 + 5*x + 5*x^2)*exp(x). - G. C. Greubel, May 25 2023
Sum{n>=0} 1/a(n) = 3/4 + Pi*sqrt(5)*coth(Pi/sqrt 5)/20 = 1.14624... - R. J. Mathar, Apr 27 2024

A085469 Decimal expansion of Madelung constant (negated) for NaCl structure.

Original entry on oeis.org

1, 7, 4, 7, 5, 6, 4, 5, 9, 4, 6, 3, 3, 1, 8, 2, 1, 9, 0, 6, 3, 6, 2, 1, 2, 0, 3, 5, 5, 4, 4, 3, 9, 7, 4, 0, 3, 4, 8, 5, 1, 6, 1, 4, 3, 6, 6, 2, 4, 7, 4, 1, 7, 5, 8, 1, 5, 2, 8, 2, 5, 3, 5, 0, 7, 6, 5, 0, 4, 0, 6, 2, 3, 5, 3, 2, 7, 6, 1, 1, 7, 9, 8, 9, 0, 7, 5, 8, 3, 6, 2, 6, 9, 4, 6, 0, 7, 8, 8, 9, 9, 3
Offset: 1

Views

Author

Eric W. Weisstein, Jul 01 2003

Keywords

Comments

This is the electrostatic potential at the origin produced by unit charges of sign (-1)^(i+j+k) at all nonzero lattice points (i,j,k).
The NaCl structure consists of two interpenetrating face-centered cubic lattices of ions with charges +1 and -1, together occupying all the sites of the simple cubic lattice. - Andrey Zabolotskiy, Oct 21 2019
Named after the German physicist Erwin Madelung (1881-1972). - Amiram Eldar, Apr 02 2022

Examples

			-1.7475645946331821906362120355443974034851614366247417581528253507...
		

References

  • Richard E. Crandall, Topics in Advanced Scientific Computation, Springer, Telos books, 1996, pages 73-79.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 76.
  • Sadri Hassani, Mathematical Methods Using Mathematica: For Students of Physics and Related Fields, Springer, NY, page 60.

Crossrefs

Cf. A004015, A005875, A108778 (continued fraction).

Programs

  • Mathematica
    RealDigits[ 12Pi*Sum[ Sech[Pi/2*Sqrt[(2j + 1)^2 + (2k + 1)^2]]^2, {j, 0, 40}, {k, 0, 40}], 10, 111][[1]] (* Robert G. Wilson v, Jul 12 2005 *)
    RealDigits[Quiet[12 Pi (Sech[Pi/Sqrt[2]]^2 + NSum[Sum[Sech[Pi Norm[2 v + 1]/2]^2, {v, FrobeniusSolve[{1, 1}, Round[m]]}, Method -> "Procedural"], {m, 1, Infinity}, Compiled -> False, Method -> "WynnEpsilon", NSumTerms -> 33, WorkingPrecision -> 100])]][[1]] (* Jan Mangaldan, Jun 25 2020 *)
    digits = 1800; m0 = 800; dm = 10; dd = 10; Clear[f, g];
    g[j_, k_] := g[j, k] = 12 Pi Sech[(Pi/2) Sqrt[(2j + 1)^2 + (2k + 1)^2]]^2 // N[#, digits + dd]&;
    f[m_] := f[m] =  Sum[g[j, k], {j, 0, m}, {k, 0, m}];
    f[m = m0]; f[m += dm];
    While[Abs[f[m] - f[m - dm]] > 10^(-digits - dd), Print[m]; m += dm];
    A085469 = f[m];
    RealDigits[A085469, 10, digits][[1]] (* Jean-François Alcover, May 08 2021, after Robert G. Wilson v *)
  • PARI
    Madelung()=my(c=Pi/2,d=asech(2^-default(realbitprecision))\/c+1); sum(j=0,d, sum(k=0,d, sech(c*sqrt((2*j+1)^2+(2*k+1)^2))),0.)*12*Pi \\ Charles R Greathouse IV, Feb 07 2025

Formula

Sum_{i, j, k not all 0} (-1)^(i+j+k)/sqrt(i^2+j^2+k^2).

Extensions

Entry revised by N. J. A. Sloane, Apr 12 2004
Definition corrected by Leslie Glasser, Jan 24 2011
Definition corrected by Andrey Zabolotskiy, Oct 21 2019

A014455 Theta series of quadratic form with Gram matrix [ 1, 0, 0; 0, 1, 0; 0, 0, 2 ]. Number of integer solutions to x^2 + y^2 + 2*z^2 = n.

Original entry on oeis.org

1, 4, 6, 8, 12, 8, 8, 16, 6, 12, 24, 8, 24, 24, 0, 16, 12, 16, 30, 24, 24, 16, 24, 16, 8, 28, 24, 32, 48, 8, 0, 32, 6, 32, 48, 16, 36, 40, 24, 16, 24, 16, 48, 40, 24, 40, 0, 32, 24, 36, 30, 16, 72, 24, 32, 48, 0, 32, 72, 24, 48, 40, 0, 48, 12, 16, 48, 56, 48, 32, 48, 16, 30, 64
Offset: 0

Views

Author

Keywords

Comments

This is the tetragonal P lattice (the classical holotype) of dimension 3.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + 4*q + 6*q^2 + 8*q^3 + 12*q^4 + 8*q^5 + 8*q^6 + 16*q^7 + 6*q^8 + 12*q^9 + ...
		

Crossrefs

Programs

  • Magma
    A := Basis( ModularForms( Gamma1(8), 3/2), 40); A[1] + 4*A[2] + 6*A[3] + 8*A[4]; /* Michael Somos, Aug 31 2014 */
  • Mathematica
    r[n_, z_] := Reduce[x^2 + y^2 + 2*z^2 == n, {x, y}, Integers]; a[n_] := Module[{rn0, rnz, k0, k}, rn0 = r[n, 0]; k0 = If[rn0 === False, 0, If[Head[rn0] === And, 1, Length[rn0]]]; For[k = 0; z = 1, z <= Ceiling[Sqrt[n/2]], z++, rnz = r[n, z]; If[rnz =!= False, k = If[Head[rnz] === And, k+1, k + Length[rnz]]]]; k0 + 2*k]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Oct 07 2013 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q]^2 EllipticTheta[ 3, 0, q^2], {q, 0, n}]; (* Michael Somos, Aug 31 2014 *)
    QP = QPochhammer; s = QP[q^2]^8*(QP[q^4]/(QP[q]^4*QP[q^8]^2)) + O[q]^80; CoefficientList[s, q] (* Jean-François Alcover, Nov 25 2015, after Michael Somos *)
  • PARI
    {a(n) = if( n<1, n==0, 2 * qfrep([ 1, 0, 0; 0, 1, 0; 0, 0, 2], n)[n])}; /* Michael Somos, Jul 05 2005 */
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^8 * eta(x^4 + A) / (eta(x + A)^4 * eta(x^8 + A)^2), n))}; /* Michael Somos, Jul 05 2005 */
    

Formula

Expansion of phi(q)^2 * phi(q^2) = psi(q)^4 / psi(q^4) in powers of q where phi(), psi() are Ramanujan theta functions. - Michael Somos, Apr 07 2012
Expansion of eta(q^2)^8 * eta(q^4) / (eta(q)^4 * eta(q^8)^2) in powers of q. - Michael Somos, Jul 05 2005
Euler transform of period 8 sequence [4, -4, 4, -5, 4, -4, 4, -3, ...]. - Michael Somos, Jul 07 2005
G.f.: theta_3(q)^2 * theta_3(q^2) = Product_{k>0} (1 - x^(2*k))^8 * (1 - x^(4*k)) / ((1 - x^k)^4 * (1 - x^(8*k))^2).
There is a classical formula (essentially due to Gauss): Write (uniquely) -2n=D(2^vf)^2, with D<0 fundamental discriminant, f odd, v>=-1. Then a(n)=12L((D/.),0)(1-(D/2))\sum_{d\mid f}\mu(d)(D/d)sigma(f/d) (the formula for A005875), except that the factor (1-(D/2)) has to be replaced by 1/3 if v=-1 and by 1 if v=0 (and kept if v>=1). Here mu() is the Moebius function, (D/2) and (D/d) are Kronecker-Legendre symbols, sigma() is the sum of divisors function, L((D/.),0)=h(D)/(w(D)/2) is the value at 0 of the L() function of the quadratic character (D/.), equal to the class number h(D) divided by 2 or 3 in the special cases D=-4 and -3. - Henri Cohen (Henri.Cohen(AT)math.u-bordeaux1.fr), May 12 2010
a(2*n) = a(8*n) = A005875(n). a(2*n + 1) = A005877(n) = 4 * A045828(n). a(4*n) = A004015(n). a(4*n + 2) = 2 * A045826(n). a(8*n + 4) = 12 * A045828(n). a(8*n + 7) = 16 * A033763(n). a(16*n + 6) = 8 * A008443(n). a(16*n + 14) = 0. - Michael Somos, Apr 07 2012
G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 32^(1/2) (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A246631.

A055039 Numbers of the form 2^(2i+1)*(8j+7).

Original entry on oeis.org

14, 30, 46, 56, 62, 78, 94, 110, 120, 126, 142, 158, 174, 184, 190, 206, 222, 224, 238, 248, 254, 270, 286, 302, 312, 318, 334, 350, 366, 376, 382, 398, 414, 430, 440, 446, 462, 478, 480, 494, 504, 510, 526, 542, 558, 568, 574, 590, 606, 622
Offset: 1

Views

Author

N. J. A. Sloane, Jun 01 2000

Keywords

Comments

The numbers not of the form x^2+y^2+2z^2.
Numbers of the form 6*x^2 + 8*x^2*(2*y -1). (Steve Waterman).
These are the numbers not occurring as norms in the face-centered cubic lattice (cf. A004015).
Numbers whose base 4 representation ends in 3,2 followed by some number of zeros. - Franklin T. Adams-Watters, Dec 04 2006
Numbers k such that the k-th coefficient of eta(x)^4/eta(x^4) is 0 where eta is the Dedekind eta function. - Benoit Cloitre, Mar 15 2025
The asymptotic density of this sequence is 1/12. - Amiram Eldar, Mar 29 2025

Examples

			In base 4: 32, 132, 232, 320, 332, 1032, 1132, 1232, 1320, 1332, 2032, ...
		

Crossrefs

Equals twice A004215. Not the same as A044075 - see A124169.
Complement of A000401.
Cf. A004015.

Programs

  • Mathematica
    Select[Range[650], Mod[# / 4^IntegerExponent[#, 4], 16] == 14 &] (* Amiram Eldar, Mar 29 2025 *)
  • Python
    from itertools import count, islice
    def A055039_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:(m:=(~n&n-1).bit_length())&1 and (n>>m)&7==7,count(max(startvalue,1)))
    A055039_list = list(islice(A055039_gen(),30)) # Chai Wah Wu, Jul 09 2022
    
  • Python
    def A055039(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(((x>>i)-7>>3)+1 for i in range(1,x.bit_length(),2))
        return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025

A004013 Theta series of body-centered cubic (b.c.c.) lattice.

Original entry on oeis.org

1, 0, 0, 8, 6, 0, 0, 0, 12, 0, 0, 24, 8, 0, 0, 0, 6, 0, 0, 24, 24, 0, 0, 0, 24, 0, 0, 32, 0, 0, 0, 0, 12, 0, 0, 48, 30, 0, 0, 0, 24, 0, 0, 24, 24, 0, 0, 0, 8, 0, 0, 48, 24, 0, 0, 0, 48, 0, 0, 72, 0, 0, 0, 0, 6, 0, 0, 24, 48, 0, 0, 0, 36, 0, 0, 56, 24, 0, 0, 0, 24, 0, 0, 72, 48, 0, 0, 0, 24, 0, 0
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 + 8*x^3 + 6*x^4 + 12*x^8 + 24*x^11 + 8*x^12 + 6*x^16 + 24*x^19 + 24*x^20 + ...
G.f. = 1 + 8*q^(3/2) + 6*q^2 + 12*q^4 + 24*q^(11/2) + 8*q^6 + 6*q^8 + 24*q^(19/2) + 24*q^10 + 24*q^12 + 32*q^(27/2) + ...
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 116.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    Basis( ModularForms( Gamma0(8), 3/2), 90) [1]; /* Michael Somos, Sep 04 2014 */
  • Maple
    M:=100; M1:=M*(M+1)/2; ph:=series(add(q^(k^2),k=-M..M),q,M1): ps:=series(add(q^(k*(k+1)/2),k=0..M),q,M1): t1:=series(subs(q=q^2, ph)^3, q,M1): t2:=series((2*sqrt(q))^3*subs(q=q^4, ps)^3,q,M1): t3:=seriestolist(series(subs(q=q^2,t1+t2),q,M1)): for n from 0 to nops(t3)-1 do lprint(n,t3[n+1]); od:
  • Mathematica
    m = 13; m1 = m*((m + 1)/2); ph[q_] = Series[ Sum[ q^k^2, {k, -m, m}], {q, 0, m1}]; ps[q_] = Series[ Sum[ q^(k*((k + 1)/2)), {k, 0, m}], {q, 0, m1}]; t1[q_] = Normal[ Series[ ph[q^2]^3, {q, 0, m1}]]; t2[q_] = Normal[ Series[ (2*Sqrt[q])^3*ps[q^4]^3, {q, 0, m1}]]; CoefficientList[ Series[ t1[q^2] + t2[q^2], {q, 0, m1}], q] (* Jean-François Alcover, Dec 20 2011, translated from Maple *)
    (* From version 6 on *) terms=91; f[q_] = LatticeData["BodyCenteredCubic", "ThetaSeriesFunction"][-I Log[q]/Pi]; CoefficientList[Simplify[f[q] + O[q]^terms, q>0], q][[1 ;; terms]] (* Jean-François Alcover, May 15 2013, updated Jul 08 2017 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, x^4]^3 + EllipticTheta[ 2, 0, x^4]^3, {x, 0, n}]; (* Michael Somos, May 24 2013 *)
  • PARI
    {a(n) = if( n<0, 0, if( n%4==0, n/=4; polcoeff( sum(k=1, sqrtint(n), 2*x^k^2, 1 + x * O(x^n))^3, n), n%8==3, n\=8; 8*polcoeff( sum(k=0, (sqrtint(8*n+1) - 1)\2, x^((k^2 + k)/2), 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^8 + A)^5 / eta(x^4 + A)^2 / eta(x^16 + A)^2)^3 + (2 * x * eta(x^16 + A)^2 / eta(x^8 + A))^3, n))}; /* Michael Somos, May 17 2008 */
    

Formula

subs(q=q^2, ph)^3+(2*sqrt(q))^3*subs(q=q^4, ps)^3, where ps = A010054 = Sum_{k=0..infinity} q^(k*(k+1)/2), ph = A000122 = Sum_{k=-infinity, infinity} q^(k^2).
Expansion of phi(q^4)^3 + 8 * q^3 * psi(q^8)^3 in powers of q where phi(), psi() are Ramanujan theta functions. - Michael Somos, Oct 25 2006
a(4*n + 1) = a(4*n + 2) = a(8*n + 7) = 0. a(4*n) = A005875(n).
Expansion of theta_3(q)^3 + theta_2(q)^3 in powers of q^(1/4).
G.f. is a period 1 Fourier series which satisfies f(-1 / (8 t)) = 2 (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A004015.
a(8*n) = A004015(n). a(8*n + 3) = 8 * A008443(n). a(8*n + 4) = 2 * A045826(n). - Michael Somos, Jul 19 2015
a(12*n + 4) = 6 * A213056(n). a(16*n + 4) = 6 * A045834(n). a(16*n + 8) = 12 * A045828(n).

A119869 Sizes of successive clusters in f.c.c. lattice centered at a lattice point.

Original entry on oeis.org

1, 13, 19, 43, 55, 79, 87, 135, 141, 177, 201, 225, 249, 321, 321, 369, 381, 429, 459, 531, 555, 603, 627, 675, 683, 767, 791, 887, 935, 959, 959, 1055, 1061, 1157, 1205, 1253, 1289, 1409, 1433, 1481, 1505, 1553, 1601, 1721, 1745, 1865, 1865, 1961, 1985, 2093, 2123
Offset: 0

Views

Author

Hugo Pfoertner, May 26 2006

Keywords

References

  • 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.

Crossrefs

Cf. A055039 [missing polyhedra]. Properties of Waterman polyhedra: A119870 [vertices], A119871 [faces], A119872 [edges], A119873 [volume]. Waterman polyhedra with different centers: A119874, A119875, A119876, A119877, A119878.

Programs

  • Maple
    maxd:=20001: read format: 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):
    t1:=series((th3^3+th4^3)/2,q,maxd): t1:=series(subs(q=sqrt(q),t1),q,floor(maxd/2)): t2:=seriestolist(t1): t4:=0; for n from 1 to nops(t2) do t4:=t4+t2[n]; lprint(n-1, t4); od: # N. J. A. Sloane, Aug 09 2006
  • Mathematica
    a[n_] := Sum[SquaresR[3, 2k], {k, 0, n}]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 12 2012, after formula *)
    Accumulate[SquaresR[3,2*Range[0,70]]] (* Harvey P. Dale, Jun 01 2015 *)

Formula

Partial sums of A004015, which has an explicit generating function.

Extensions

Edited by N. J. A. Sloane, Aug 09 2006
Additional links from Steve Waterman, Nov 26 2006

A213384 Expansion of phi(-q)^3 in powers of q where phi() is a Ramanujan theta function.

Original entry on oeis.org

1, -6, 12, -8, 6, -24, 24, 0, 12, -30, 24, -24, 8, -24, 48, 0, 6, -48, 36, -24, 24, -48, 24, 0, 24, -30, 72, -32, 0, -72, 48, 0, 12, -48, 48, -48, 30, -24, 72, 0, 24, -96, 48, -24, 24, -72, 48, 0, 8, -54, 84, -48, 24, -72, 96, 0, 48, -48, 24, -72, 0, -72, 96
Offset: 0

Views

Author

Michael Somos, Jun 10 2012

Keywords

Comments

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

Examples

			G.f. = 1 - 6*q + 12*q^2 - 8*q^3 + 6*q^4 - 24*q^5 + 24*q^6 + 12*q^8 - 30*q^9 + ...
		

Crossrefs

Programs

  • Julia
    # JacobiTheta4 is defined in A002448.
    A213384List(len) = JacobiTheta4(len, 3)
    A213384List(63) |> println # Peter Luschny, Mar 12 2018
  • Magma
    A := Basis( ModularForms( Gamma0(16), 3/2), 63); A[1] - 6*A[2] + 12*A[3] - 8*A[4]; /* Michael Somos, May 21 2015 */
    
  • Mathematica
    a[ n_] := (-1)^n SquaresR[ 3, n]; (* Michael Somos, May 21 2015 *)
    a[ n_] := (-1)^n Length @ FindInstance[ n == x^2 + y^2 + z^2, {x, y, z}, Integers, 10^9]; (* Michael Somos, May 21 2015 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, q]^3, {q, 0, n}]; (* Michael Somos, May 21 2015 *)
    a[ n_] := SeriesCoefficient[ (QPochhammer[ q]^2 / QPochhammer[ q^2])^3, {q, 0, n}]; (* Michael Somos, May 21 2015 *)
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x + A)^2 / eta(x^2 + A))^3, n))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum( k=1, sqrtint(n), 2 * (-x)^k^2, 1 + x * O(x^n))^3, n))}; /* Michael Somos, May 21 2015 */
    
  • PARI
    {a(n) = my(G); if( n<0, 0, G = [ 1, 0, 0; 0, 1, 0; 0, 0, 1]; (-1)^n * polcoeff( 1 + 2 * x * Ser( qfrep( G, n)), n))}; /* Michael Somos, May 21 2015 */
    

Formula

Expansion of (eta(q)^2 / eta(q^2))^3 in powers of q.
Euler transform of period 2 sequence [ -6, -3, ...].
G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 2^(15/2) (t/i)^(3/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A008443.
G.f.: (Sum_{k in Z} (-1)^k * x^k^2)^3.
a(n) = (-1)^n * A005875(n). a(2*n) = A004015(n). a(2*n + 1) = -2 * A045826(n). a(4*n) = A005875(n). a(4*n + 1) = -6 * A045834(n). a(4*n + 2) = 12 * A045828(n). a(8*n + 3) = -8 * A008443(n). a(8*n + 7) = 0.
Showing 1-10 of 18 results. Next