OFFSET
1,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
Michael Somos, Introduction to Ramanujan theta functions
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
Expansion of q * (phi(-q) * psi(q^2)^2)^2 in powers of q where phi(), psi() are Ramanujan theta functions.
Euler transform of period 4 sequence [ -4, 2, -4, -6, ...].
a(n) is multiplicative with a(2^e) = -(4^e) if e>0, a(p^e) = ((p^2)^(e+1) - 1) / (p^2 - 1) if p == 1 (mod 4), a(p^e) = ((p^2)^(e+1) - (-1)^(e+1)) / (p^2 + 1) if p == 3 (mod 4).
G.f. is a period 1 Fourier series which satisfies f(-1 / (4 t)) = 2 (t/i)^3 g(t) where q = exp(2 Pi i t) and g() is the g.f. for A138502.
G.f.: x * (Product_{k>0} (1 - x^k)^3 * (1 + x^k) * (1 + x^(2*k))^4)^2.
a(n) = -(-1)^n * A050470(n).
EXAMPLE
G.f. = q - 4*q^2 + 8*q^3 - 16*q^4 + 26*q^5 - 32*q^6 + 48*q^7 - 64*q^8 + 73*q^9 + ...
MATHEMATICA
a[ n_] := If[ n < 1, 0, -(-1)^n DivisorSum[ n, #^2 Mod[n/#, 2] (-1)^Quotient[n/#, 2] &]]; (* Michael Somos, Aug 26 2015 *)
a[ n_] := SeriesCoefficient[ q (QPochhammer[ q]^2 QPochhammer[ q^4]^4 / QPochhammer[ q^2]^3)^2, {q, 0, n}]; (* Michael Somos, Aug 26 2015 *)
PROG
(PARI) {a(n) = if( n<1, 0, -(-1)^n * sumdiv( n, d, d^2 * (n / d % 2) * (-1)^(n / d \ 2)))};
(PARI) {a(n) = my(A, p, e, f); if( n<0, 0, A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, -4^e, f = (-1)^(p\2); ((p^2)^(e+1) - f^(e+1)) / (p^2 - f))))};
(PARI) {a(n) = my(A); if( n<1, 0, n--; A = x * O(x^n) ; polcoeff( (eta(x + A)^2 * eta(x^4 + A)^4 / eta(x^2 + A)^3)^2, n))};
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Michael Somos, Mar 20 2008
STATUS
approved