OFFSET
0,3
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Michael Somos, Introduction to Ramanujan theta functions
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
EXAMPLE
G.f. = 1 - 2*x^2 - 2*x^3 + 2*x^4 + 2*x^5 - 2*x^6 + 2*x^8 + 4*x^9 - 2*x^10 + ...
MATHEMATICA
a[ n_] := If[ n < 0, 0, With[ {m = Quotient[ Sqrt[24 n + 1] - 1, 6]}, SeriesCoefficient[ Sum[ (-1)^k x^(k (3 k + 1)/2) (1 + x^k) / (1 + x^(2 k)), {k, -m, m}], {x, 0, n}]]]; (* Michael Somos, Jul 26 2015 *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( 1 + 2 * sum(k=1, (sqrtint(24*n + 1) - 1) \ 6, (-1)^k * x^(k*(3*k + 1)/2) * (1 + x^k) / (1 + x^(2*k)), x * O(x^n)), n))};
(PARI) {a(n) = my(t); if( n<0, 0, t = 1 + O(x^n); polcoeff( sum(k=1, sqrtint(n), t *= x^(2*k - 1) / (1 + x^(2*k)) + x * O(x^(n - (k-1)^2)), 1) * eta(x + x * O(x^n)), n))};
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Sep 22 2007
STATUS
approved