OFFSET
0,6
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
Number of solutions to 16*n + 5 = (8*u + 1)^2 + (8*v + 2)^2 where u,v in Z.
Euler transform of period 16 sequence [ 0, 1, 1, -1, 1, 0, 0, -2, 0, 0, 1, -1, 1, 1, 0, -2, ...].
a(9*n + 1) = a(9*n + 4) = 0. a(9*n + 7) = A259285(n).
EXAMPLE
G.f. = 1 + x^2 + x^3 + 2*x^5 + x^6 + x^7 + x^9 + x^11 + x^12 + x^14 + ...
G.f. = q^5 + q^37 + q^53 + 2*q^85 + q^101 + q^117 + q^149 + q^181 + q^197 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ QPochhammer[ -x^2, x^8] QPochhammer[ -x^3, x^8] QPochhammer[ -x^5, x^8] QPochhammer[ -x^6, x^8] QPochhammer[x^8]^2, {x, 0, n}];
a[ n_] := SeriesCoefficient[ Product[(1 + x^(8 k - 2)) (1 + x^(8 k - 3)) (1 + x^(8 k - 5)) (1 + x^(8 k - 6)) (1 - x^(8 k))^2, {k, Ceiling[n/8]}], {x, 0, n}];
PROG
(PARI) {a(n) = my(m, s, x, c); if( n<0, 0, s = sqrtint(m = 16*n + 5); for(u = (s+1)\-8, (s-1)\8, if( issquare( m - (8*u + 1)^2, &x) && (x%8==2 || x%8==6), c++))); c};
(PARI) {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k)^[ 2, 0, -1, -1, 1, -1, 0, 0, 2, 0, 0, -1, 1, -1, -1, 0][k%16 + 1], 1 + x * O(x^n)), n))};
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael Somos, Jun 23 2015
STATUS
approved