OFFSET
0,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..2500
Michael Somos, Introduction to Ramanujan theta functions
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
Expansion of f(-q^3, -q^5)^2 * phi(q^2) / psi(-q) = f(-q^3, -q^5)^2 * chi(q^2)^2 / chi(-q) in powers of q where phi(), psi(), chi(), f() are Ramanujan theta functions.
Euler transform of period 8 sequence [1, 2, -1, -2, -1, 2, 1, -2, ...].
Moebius transform is period 8 sequence [1, 2, 1, 0, -1, -2, -1, 0, ...].
EXAMPLE
G.f. = 1 + q + 3*q^2 + 2*q^3 + 3*q^4 + 2*q^6 + 3*q^8 + 3*q^9 + 4*q^10 + ...
MATHEMATICA
a[ n_] := If[ n < 1, Boole[n == 0], Sum[ {1, 2, 1, 0, -1, -2, -1, 0}[[ Mod[ d, 8, 1] ]], {d, Divisors @ n}]];
a[ n_] := SeriesCoefficient[ EllipticTheta[ 3, 0, q^2] (EllipticTheta[ 3, 0, q] + EllipticTheta[ 3, 0, q^2]) / 2, {q, 0, n}];
PROG
(PARI) {a(n) = if( n<1, n==0, sumdiv(n, d, [0, 1, 2, 1, 0, -1, -2, -1][d%8 + 1]))};
(PARI) {a(n) = my(A, B); if( n<0, 0, A = sum(k=1, sqrtint(n), 2 * x^k^2, 1 + x * O(x^n)); B = subst(A, x, x^2); polcoeff( B * (A + B) / 2, n))};
(Sage) A = ModularForms( Gamma1(8), 1, prec=33) . basis(); A[0] + A[1] + 3*A[2];
(Magma) A := Basis( ModularForms( Gamma1(8), 1), 33); A[1] + A[2] + 3*A[3];
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, Jun 29 2014
STATUS
approved