%I M0931 #34 Oct 15 2022 08:09:08
%S 2,4,2,4,4,0,6,4,0,4,4,4,2,4,0,4,8,0,4,0,2,8,4,0,4,4,0,4,4,4,2,8,0,0,
%T 4,0,8,4,4,4,0,0,6,4,0,4,8,0,4,4,0,8,0,0,0,8,6,4,4,0,4,4,0,0,4,4,8,4,
%U 0,4,4,0,6,4,0,0,8,0,4,4,0,12,0,4,4,0,0,4,4,0,2,8,4,4,8,0,0,4,0,4,4,4,4,0
%N Theta series of square lattice with respect to edge.
%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%C Number of solutions in integers of n = x^2 + y^2 + y.
%D J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 106.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H G. C. Greubel, <a href="/A004020/b004020.txt">Table of n, a(n) for n = 0..1000</a>
%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>.
%F G.f.: 2 * (Sum_{k>0} x^((k^2 - k)/2))^2 = (Sum_{k in Z} x^(k^2 + k)) * (Sum_{k in Z} x^(k^2)).
%F Expansion of q^(-1/2) * c(q) / 2 in powers of q^2 where c(q) is the third function in the quadratic Gauss AGM. - _Michael Somos_, Feb 10 2006
%F Expansion of 2 * phi(x) * psi(x^2) in powers of q where phi(), psi() are Ramanujan theta functions. - _Michael Somos_, Feb 10 2006
%F a(n) = 2*A008441(n) = A004531(4*n + 1).
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi (A000796). - _Amiram Eldar_, Oct 15 2022
%e G.f. = 2 + 4*x + 2*x^2 + 4*x^3 + 4*x^4 + 6*x^6 + 4*x^7 + 4*x^9 + 4*x^10 + ...
%e G.f. = 2*q + 4*q^5 + 2*q^9 + 4*q^13 + 4*q^17 + 6*q^25 + 4*q^29 + 4*q^37 + ...
%t a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, x] EllipticTheta[ 2, 0, x] / x^(1/4), {x, 0, n}]; (* _Michael Somos_, Feb 22 2015 *)
%t s = 2*QPochhammer[q^2]^4/QPochhammer[q]^2+O[q]^100; CoefficientList[s, q] (* _Jean-François Alcover_, Nov 09 2015 *)
%o (PARI) {a(n) = local(A); if( n<0, 0, A = x * O(x^n); 2 * polcoeff( eta(x^2 A)^4 / eta(x + A)^2, n))};
%o (PARI) {a(n) = 2 * if( n<1, n==0, polcoeff( sum(k=0, (sqrtint(8*n + 1) - 1)\2, x^(k*(k + 1)/2), x*O(x^n))^2, n))};
%Y Cf. A000122, A000700, A000796, A004531, A008441, A010054, A121373.
%K nonn
%O 0,1
%A _N. J. A. Sloane_
|