OFFSET
0,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Michael Somos, Introduction to Ramanujan theta functions
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
Expansion of q^(-1/2) * eta(q) * eta(q^4)^2 * eta(q^6)^7 / (eta(q^2)^3 * eta(q^3)^3 * eta(q^12)^2) in powers of q.
Euler transform of period 12 sequence [ -1, 2, 2, 0, -1, -2, -1, 0, 2, 2, -1, -2, ...].
a(n) = b(2*n + 1) where b() is multiplicative with b(2^e) = 0^e, b(3^e) = (-1)^e, b(p^e) = e+1 if p == 1 (mod 4), b(p^e) = (1 + (-1)^e)/2 if p == 3 (mod 4).
G.f.: Product_{k>0} (1 + x^(2*k))^2 * (1 - x^(3*k))^2 * (1 + x^(3*k))^5 / ((1 + x^k) * (1 + x^(6*k))^2).
G.f.: Sum_{k in Z} x^(3*k) / (1 + x^(6*k + 1)) = Sum_{k>0} x^(k-1) * (1 - x^(2*k -1))^2 / (1 + x^(6*k - 3)).
abs(a(n)) = A125079(n). a(6*n + 3) = a(6*n + 5) = 0.
EXAMPLE
G.f. = 1 - x + 2*x^2 + x^4 + 2*x^6 - 2*x^7 + 2*x^8 + 3*x^12 - x^13 + 2*x^14 + ...
G.f. = q - q^3 + 2*q^5 + q^9 + 2*q^13 - 2*q^15 + 2*q^17 + 3*q^25 - q^27 + ...
MATHEMATICA
a[ n_] := If[ n < 0, 0, Module[ {m = n}, If[ Mod[n, 6] == 1, m = Quotient[ n, 3]; -1, 1] DivisorSum[ 2 m + 1, KroneckerSymbol[ -4, #] &]]]; (* Michael Somos, Nov 11 2015 *)
a[ n_] := If[ n < 0, 0, Times @@ (Which[# == 1, 1, # == 2, 0, # == 3, (-1)^#2, Mod[#, 4] == 1, #2 + 1, True, Mod[#2 + 1, 2]] & @@@ FactorInteger[2 n + 1])]; (* Michael Somos, Nov 11 2015 *)
PROG
(PARI) {a(n) = if( n<0, 0, if( n%6==1, n\=3; -1, 1) * sumdiv(2*n + 1, d, kronecker(-4, d)) )};
(PARI) {a(n) = my(A, p, e); if( n<0, 0, n = 2*n + 1; A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, 0, p==3, (-1)^e, p%4==1, e+1, 1-e%2 )))};
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Apr 16 2007
STATUS
approved