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.

A028586 Theta series of lattice with Gram matrix [2 1; 1 3].

Original entry on oeis.org

1, 0, 2, 4, 0, 0, 0, 4, 2, 0, 2, 0, 4, 0, 0, 4, 0, 0, 6, 0, 0, 0, 0, 4, 0, 0, 0, 8, 4, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 2, 0, 8, 4, 0, 0, 0, 4, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 12, 0, 0, 0, 4, 0, 0, 0, 0, 6, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 8, 0, 0, 6, 0, 4, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 4
Offset: 0

Views

Author

Keywords

Comments

Ramanujan theta functions: f(q) := Prod_{k>=1} (1-(-q)^k) (see A121373), phi(q) := theta_3(q) := Sum_{k=-oo..oo} q^(k^2) (A000122), psi(q) := Sum_{k=0..oo} q^(k*(k+1)/2) (A010054), chi(q) := Prod_{k>=0} (1+q^(2k+1)) (A000700).
The number of integer solutions (x, y) to 2*x^2 + 2*x*y + 3*y^2 = n, discriminant -20. - Ray Chandler, Jul 12 2014

Examples

			1 + 2*q^2 + 4*q^3 + 4*q^7 + 2*q^8 + 2*q^10 + 4*q^12 + 4*q^15 + 6*q^18 + 4*q^23 + 8*q^27 + 4*q^28 + 2*q^32 + 4*q^35 + 2*q^40 + 8*q^42 + 4*q^43 + 4*q^47 + ...
		

Programs

  • Mathematica
    terms = 104; phi[q_] := EllipticTheta[3, 0, q]; chi[q_] := ((1 - InverseEllipticNomeQ[q])*InverseEllipticNomeQ[q]/(16*q))^(-1/24); psi[q_] := (1/2)*q^(-1/8)*EllipticTheta[2, 0, q^(1/2)]; s = phi[q^2]*phi[q^10] + 4*q^3*psi[q^4]*psi[q^20] + O[q]^(terms+1); CoefficientList[s, q] (* Jean-François Alcover, Jul 04 2017, after Michael Somos *)
    r[n_]:=Reduce[{x, y}.{{2, 1}, {1, 3}}.{x, y}==n, {x, y}, Integers]; Table[rn=r[n]; Which[rn===False, 0, Head[rn]===Or, Length[rn], Head[rn]===And, 1], {n, 0, 105}] (* Vincenzo Librandi, Feb 23 2020 *)
  • PARI
    {a(n) = if( n<1, n==0, qfrep([2, 1; 1, 3], n)[n] * 2)} /* Michael Somos, Aug 13 2006 */

Formula

G.f.: Sum_{n,m} x^(2*n^2 + 2*m*n + 3*m^2). - Michael Somos, Jan 31 2011
Expansion of (theta_3(z)*theta_3(5z)+theta_2(z)*theta_2(5z)).
Expansion of phi(q^2) * phi(q^10) + 4 * q^3 * psi(q^4) * psi(q^20) in powers of q where phi(q),psi(q) are Ramanujan theta functions. - Michael Somos, Aug 13 2006
If p is prime then a(p) is nonzero iff p is in A106865.
0=a(n)a(2n) and 2*A035170(n)=a(n)+a(2n) if n>0. - Michael Somos, Oct 21 2006