OFFSET
1,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Michael Somos, Introduction to Ramanujan theta functions
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
Expansion of (1 - eta(q)^2 * eta(q^2) * eta(q^6)^3 / (eta(q^3)^2 * eta(q^4) * eta(q^12))) / 2 in powers of q.
Moebius transform is period 12 sequence [ 1, 0, -4, 0, 1, 0, -1, 0, 4, 0, -1, 0, ...].
a(n) is multiplicative with a(2^e) = 1, a(3^e) = -1 + 2 * (-1)^e, a(p^e) = e+1 if p == 1, 5 (mod 12), a(p^e) = (1 + (-1)^e) / 2 if p == 7, 11 (mod 12).
G.f.: Sum_{k>0} f(3*k - 2) + f(3*k - 1) - 2 * f(3*k) where f(n) := x^n / (1 + x^(2*n)).
a(12*n + 7) = a(12*n + 11) = 0. a(2*n) = a(n). a(2*n + 1) = A116604(n).
EXAMPLE
G.f. = q + q^2 - 3*q^3 + q^4 + 2*q^5 - 3*q^6 + q^8 + q^9 + 2*q^10 - 3*q^12 + ...
MATHEMATICA
a[ n_] := If[ n < 1, 0, DivisorSum[ n, KroneckerSymbol[ -4, n/#] {1, 1, -2}[[Mod[#, 3, 1]]] &]]; (* Michael Somos, Sep 07 2015 *)
a[ n_] := SeriesCoefficient[ (2 - 3 EllipticTheta[ 3, 0, q^3]^2 + EllipticTheta[ 3, 0, q]^2) / 4, {q, 0, n}]; (* Michael Somos, Sep 07 2015 *)
PROG
(PARI) {a(n) = if( n<1, 0, - sumdiv(n, d, kronecker(-4, n/d) * [2, -1, -1][d%3 + 1]))};
(PARI) {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, 1, p==3, -1 + 2 * (-1)^e, p%12 < 6, e+1, 1-e%2)))};
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Michael Somos, Apr 03 2008
STATUS
approved