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.
%I A002448 #79 Aug 18 2025 22:15:47 %S A002448 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, %T A002448 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, %U A002448 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 %N A002448 Expansion of Jacobi theta function theta_4(x). %C A002448 Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700). %C A002448 Number 2 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 %D A002448 Richard Bellman, A Brief Introduction to Theta Functions, Dover, 2013. %D A002448 N. J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 93, Eq. (34.11), p. 6, Eq. (7.324). %D A002448 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. %D A002448 E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464. %H A002448 T. D. Noe, <a href="/A002448/b002448.txt">Table of n, a(n) for n = 0..10000</a> %H A002448 J. H. Conway and N. J. A. Sloane, <a href="http://dx.doi.org/10.1007/978-1-4757-2016-7">Sphere Packings, Lattices and Groups</a>, Springer-Verlag, p. 103. %H A002448 J. W. L. Glaisher, <a href="http://resolver.sub.uni-goettingen.de/purl?PPN599484047_0002">On the deduction of series from infinite products</a>, Messenger of Math., 2 (1873), p. 141. %H A002448 Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a> %H A002448 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/JacobiThetaFunctions.html">Jacobi Theta Functions</a> %H A002448 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/q-SeriesIdentities.html">q-Series Identities</a> %H A002448 D. Zagier, <a href="http://dx.doi.org/10.1007/978-3-540-74119-0">Elliptic modular forms and their applications</a> in "The 1-2-3 of modular forms", Springer-Verlag, 2008 %F A002448 Expansion of phi(-q) in powers of q where phi() is a Ramanujan theta function. %F A002448 Expansion of eta(q)^2 / eta(q^2) in powers of q. - _Michael Somos_, May 01 2003 %F A002448 Expansion of 2 * sqrt( k' * K / (2 Pi) ) in powers of q. - _Michael Somos_, Nov 30 2013 %F A002448 Euler transform of period 2 sequence [ -2, -1, ...]. - _Michael Somos_, May 01 2003 %F A002448 G.f.: Sum_{k in Z} (-1)^k * x^(k^2) = Product_{k>0} (1 - x^k) / (1 + x^k). - _Michael Somos_, May 01 2003. %F A002448 G.f.: 1 - 2 Sum_{k>0} x^k/(1 - x^k) Product_{j=1..k} (1 - x^j) / (1 + x^j). - _Michael Somos_, Apr 12 2012 %F A002448 a(n) = -2 * b(n) where b(n) is multiplicative and b(2^e) = (-1)^(e/2) if e even, b(p^e) = 1 if p>2 and e even, otherwise 0. - _Michael Somos_, Jul 07 2006 %F A002448 a(3*n + 1) = -2 * A089802(n), a(9*n) = a(n). - _Michael Somos_, Jul 07 2006 %F A002448 a(3*n + 2) = a(4*n + 2) = a(4*n + 3) = 0. a(4*n) = A000122(n). a(n) = (-1)^n * A000122(n). a(8*n + 1) = -2 * A010054(n). - _Michael Somos_, Apr 12 2012 %F A002448 For n > 0, a(n) = 2*(floor(sqrt(n))-floor(sqrt(n-1)))*(-1)^(floor(sqrt(n))). - _Mikael Aaltonen_, Jan 17 2015 %F A002448 G.f. is a period 1 Fourier series which satisfies f(-1 / (16 t)) = 32^(1/2) (t/i)^(1/2) g(t) where q = exp(2 Pi i t) and g() is the g.f. for A010054. - _Michael Somos_, May 05 2016 %F A002448 a(0) = 1, a(n) = -(2/n)*Sum_{k=1..n} A002131(k)*a(n-k) for n > 0. - _Seiichi Manyama_, Apr 29 2017 %F A002448 G.f.: exp(Sum_{k>=1} (sigma(k) - sigma(2*k))*x^k/k). - _Ilya Gutkovskiy_, Sep 19 2018 %F A002448 From _Peter Bala_, Feb 19 2021: (Start) %F A002448 G.f: A(q) = eta(q^2)^5 / ( eta(-q)*eta(q^4) )^2. %F A002448 A(q) = 1 + 2*Sum_{n >= 1} (-1)^n*q^(n*(n+1)/2)/( (1 + q^n) * Product_{k = 1..n} 1 - q^k ). %F A002448 A(-q)^2 = 1 + 4*Sum_{n >= 1} (-1)^(n+1)*q^(2*n-1)/(1 - q^(2*n-1)), which gives the number of representations of an integer as a sum of two squares. See, for example, Fine, 26.63. %F A002448 The unsigned sequence has the g.f. 1 + 2*Sum_{n >= 1} q^(n*(n+1)/2) * ( Product_{k = 1..n-1} 1 + q^k ) /( Product_{k = 1..n} 1 + q^(2*k) ) = 1 + 2*q + 2*q^4 + 2*q^9 + .... See Fine, equation 14.43. (End) %F A002448 Form _Peter Bala_, Sep 27 2023: (Start) %F A002448 G.f. A(q) satisfies A(q)*A(-q) = A(q^2)^2. %F A002448 A(q) = Sum_{n >= 1} (-q)^(n-1)*Product_{k >= n} 1 - q^k. (End) %e A002448 G.f. = 1 - 2*q + 2*q^4 - 2*q^9 + 2*q^16 - 2*q^25 + 2*q^36 - 2*q^49 + ... %p A002448 Sum((-x)^(m^2),m=-10..10); %t A002448 a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, q], {q, 0, n}]; (* _Michael Somos_, Jul 11 2011 *) %t A002448 QP = QPochhammer; s = QP[q]^2/QP[q^2] + O[q]^105; CoefficientList[s, q] (* _Jean-François Alcover_, Dec 01 2015, adapted from PARI *) %o A002448 (PARI) {a(n) = if( n<0, 0, (-1)^n * issquare(n) * 2 - (n==0))}; /* _Michael Somos_, Jun 17 1999 */ %o A002448 (PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A)^2 / eta(x^2 + A), n))}; /* _Michael Somos_, May 01 2003 */ %o A002448 (Julia) %o A002448 using Nemo %o A002448 function JacobiTheta4(len, r) %o A002448 R, x = PolynomialRing(ZZ, "x") %o A002448 e = theta_qexp(r, len, -x) %o A002448 [fmpz(coeff(e, j)) for j in 0:len - 1] end %o A002448 A002448List(len) = JacobiTheta4(len, 1) %o A002448 A002448List(105) |> println # _Peter Luschny_, Mar 12 2018 %o A002448 (Python) %o A002448 from sympy.ntheory.primetest import is_square %o A002448 def A002448(n): return (-is_square(n) if n&1 else is_square(n))<<1 if n else 1 # _Chai Wah Wu_, May 17 2023 %Y A002448 Cf. A000122, A000203, A010054, A089802. %K A002448 sign,easy,changed %O A002448 0,2 %A A002448 _N. J. A. Sloane_