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 A004020 M0931 #35 Feb 16 2025 08:32:28 %S A004020 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 A004020 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 A004020 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 A004020 Theta series of square lattice with respect to edge. %C A004020 Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700). %C A004020 Number of solutions in integers of n = x^2 + y^2 + y. %D A004020 J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 106. %D A004020 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A004020 G. C. Greubel, <a href="/A004020/b004020.txt">Table of n, a(n) for n = 0..1000</a> %H A004020 Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>. %H A004020 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>. %F A004020 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 A004020 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 A004020 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 A004020 a(n) = 2*A008441(n) = A004531(4*n + 1). %F A004020 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi (A000796). - _Amiram Eldar_, Oct 15 2022 %e A004020 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 A004020 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 A004020 a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, x] EllipticTheta[ 2, 0, x] / x^(1/4), {x, 0, n}]; (* _Michael Somos_, Feb 22 2015 *) %t A004020 s = 2*QPochhammer[q^2]^4/QPochhammer[q]^2+O[q]^100; CoefficientList[s, q] (* _Jean-François Alcover_, Nov 09 2015 *) %o A004020 (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 A004020 (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 A004020 Cf. A000122, A000700, A000796, A004531, A008441, A010054, A121373. %K A004020 nonn %O A004020 0,1 %A A004020 _N. J. A. Sloane_