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