%I #10 Mar 12 2021 22:24:48
%S 1,1,1,1,0,0,1,2,0,1,1,0,2,2,0,0,1,0,0,1,1,1,2,0,1,0,0,2,1,1,2,1,0,1,
%T 1,0,0,1,0,1,1,0,2,1,0,1,0,2,0,1,0,1,3,0,1,0,1,3,1,0,0,0,0,1,2,1,1,0,
%U 0,1,0,0,2,1,0,1,1,0,2,1,0,0,3,1,0,1,0
%N Expansion of psi(x^2) * f(x, x^7) in powers of x where psi(), f(,) are Ramanujan theta functions.
%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%H G. C. Greubel, <a href="/A259285/b259285.txt">Table of n, a(n) for n = 0..1000</a>
%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>
%F Number of solutions to 16*n + 13 = (8*u + 3)^2 + (8*v + 2)^2 where u,v in Z.
%F Euler transform of period 16 sequence [ 1, 0, 0, -1, 0, 1, 1, -2, 1, 1, 0, -1, 0, 0, 1, -2, ...].
%F a(9*n + 2) = A259287(n). a(9*n + 5) = a(9*n + 8) = 0.
%F -2 * a(n) = A134343(4*n + 3). a(n) = A000161(16*n + 13) = A025426(16*n + 13) = A025435(16*n + 13) = A025441(16*n + 13).
%e G.f. = 1 + x + x^2 + x^3 + x^6 + 2*x^7 + x^9 + x^10 + 2*x^12 + 2*x^13 + ...
%e G.f. = q^13 + q^29 + q^45 + q^61 + q^109 + 2*q^125 + q^157 + q^173 + ...
%t a[ n_] := SeriesCoefficient[ QPochhammer[ -x^1, x^8] QPochhammer[ -x^2, x^8] QPochhammer[ -x^6, x^8] QPochhammer[ -x^7, x^8] QPochhammer[x^8]^2, {x, 0, n}];
%t a[ n_] := SeriesCoefficient[ Product[ (1 + x^(8 k - 1)) (1 + x^(8 k - 2)) (1 + x^(8 k - 6)) (1 + x^(8 k - 7)) (1 - x^(8 k))^2, {k, Ceiling[n/8]}], {x, 0, n}];
%o (PARI) {a(n) = my(m, s, x, c); if( n<0, 0, s = sqrtint(m = 16*n + 13); for(u = (s+3)\-8, (s-3)\8, if( issquare( m - (8*u + 3)^2, &x) && (x%8==2 || x%8==6), c++))); c};
%o (PARI) {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k)^[ 2, -1, 0, 0, 1, 0, -1, -1, 2, -1, -1, 0, 1, 0, 0, -1][k%16 + 1], 1 + x * O(x^n)), n))};
%Y Cf. A000161, A025426, A025435, A025441, A134343, A259287.
%K nonn
%O 0,8
%A _Michael Somos_, Jun 23 2015