OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Michael Somos, Introduction to Ramanujan theta functions
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
Expansion of (chi(x) * psi(-x^3))^2 in powers of x where chi(), psi() are Ramanujan theta functions.
Expansion of q^(-2/3) * (eta(q^2)^2 * eta(q^3) * eta(q^12) / (eta(q) * eta(q^4) * eta(q^6)))^2 in powers of q.
Euler transform of period 12 sequence [2, -2, 0, 0, 2, -2, 2, 0, 0, -2, 2, -2, ...].
EXAMPLE
G.f. = 1 + 2*x + x^2 + 2*x^5 + 2*x^6 + 2*x^8 + 2*x^9 + x^10 + 2*x^13 + ...
G.f. = q^2 + 2*q^5 + q^8 + 2*q^17 + 2*q^20 + 2*q^26 + 2*q^29 + q^32 + ...
MATHEMATICA
a[ n_] := If[ n < 0, 0, With[ {m = 3 n + 2}, Sum[ KroneckerSymbol[ -4, d], {d, Divisors@m}]]]; (* Michael Somos, Nov 14 2011 *)
QP = QPochhammer; s = (QP[q^2]^2*QP[q^3]*(QP[q^12]/(QP[q]*QP[q^4]*QP[q^6]) ))^2 + O[q]^105; CoefficientList[s, q] (* Jean-François Alcover, Nov 30 2015, adapted from PARI *)
a[ n_] := SeriesCoefficient[ (EllipticTheta[ 3, 0, x^(1/3)] - EllipticTheta[ 3, 0, x^3])^2 / (4 x^(2/3)), {x, 0, n}]; (* Michael Somos, Jan 19 2017 *)
a[ n_] := SeriesCoefficient[ (QPochhammer[ -x, x^2] EllipticTheta[ 2, Pi/4, x^(3/2)])^2 / (2 x^(3/4)), {x, 0, n}]; (* Michael Somos, Jan 19 2017 *)
PROG
(PARI) {a(n) = if( n<0, 0, n = 3*n+2; sumdiv(n, d, (d%4==1) - (d%4==3)))};
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A)^2 * eta(x^3 + A) * eta(x^12 + A) / (eta(x + A) * eta(x^4 + A) * eta(x^6 + A)))^2, n))};
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, Sep 14 2006
STATUS
approved