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
Euler transform of period 8 sequence [ 1, 1, 2, 1, 2, 1, 1, 0, ...].
EXAMPLE
G.f. = 1 + x + 2*x^2 + 4*x^3 + 6*x^4 + 10*x^5 + 16*x^6 + 23*x^7 + 34*x^8 + 50*x^9 + ...
G.f. = q^9 + q^25 + 2*q^41 + 4*q^57 + 6*q^73 + 10*q^89 + 16*q^105 + 23*q^121 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ Product[ (1 - x^k)^-{ 1, 1, 2, 1, 2, 1, 1, 0}[[Mod[k, 8, 1]]], {k, n}], {x, 0, n}]; (* Michael Somos, Nov 01 2015 *)
a[ n_] := SeriesCoefficient[ QPochhammer[ x, x^8] QPochhammer[ x^7, x^8] QPochhammer[ x^8] / EllipticTheta[ 4, 0, x], {x, 0, n}]; (* Michael Somos, Nov 01 2015 *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k + x*O(x^n))^-[ 0, 1, 1, 2, 1, 2, 1, 1][k%8 + 1]), n))};
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, Aug 13 2007
STATUS
approved