OFFSET
0,12
REFERENCES
S. Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988, p. 10
FORMULA
G.f.: Sum_{k>=0} (-1)^k * x^(k*(k + 1)/2) / (x^2; x^2)_n.
EXAMPLE
G.f. = 1 - x - x^6 + x^7 - x^8 + x^9 - x^10 + 2*x^11 - 2*x^12 + 2*x^13 - 2*x^14 + ...
MATHEMATICA
a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ (-1)^k x^(k (k + 1)/2) / QPochhammer[ x^2, x^2, k], {k, 0, Sqrt[8 n + 1]}], {x, 0, n}]]; (* Michael Somos, Nov 01 2015 *)
PROG
(PARI) {a(n) = my(t); if( n<0, 0, t = 1 + x * O(x^n); polcoeff( sum(k=1, (sqrtint(8*n + 1) - 1)\2, t = -t * x^k / (1 - x^(2*k)) + x * O(x^n), 1), n))};
CROSSREFS
KEYWORD
sign
AUTHOR
Michael Somos, Aug 13 2007
STATUS
approved