A000122 Expansion of Jacobi theta function theta_3(x) = Sum_{m =-oo..oo} x^(m^2) (number of integer solutions to k^2 = n).
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
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.
Links
- T. D. Noe, Table of n, a(n) for n = 0..10000
- Steven R. Finch, Mathematical Constants II, Encyclopedia of Mathematics and Its Applications, Cambridge University Press, Cambridge, 2018.
- M. D. Hirschhorn and J. A. Sellers, A Congruence Modulo 3 for Partitions into Distinct Non-Multiples of Four, Article 14.9.6, Journal of Integer Sequences, Vol. 17 (2014).
- K. Ono, S. Robins and P. T. Wahl, On the representation of integers as sums of triangular numbers, Aequationes mathematicae, August 1995, Volume 50, Issue 1-2, pp 73-94.
- Michael Somos, Introduction to Ramanujan theta functions
- Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
- Eric Weisstein's World of Mathematics, Jacobi Theta Functions
Crossrefs
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)
Comments