%I #62 Aug 04 2020 06:16:21
%S 1,-1,0,-1,0,0,1,0,0,0,1,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0,0,0,0,1,0,0,0,
%T 0,0,0,0,1,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,
%U 0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0
%N Expansion of f(-x, -x^3) in powers of x where f(,) is Ramanujan's general theta function.
%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
%C This is a expansion of Ramanujan's general theta function in powers of x because |a(n)| = A010054(n) is also the characteristic function of generalized hexagonal numbers. - _Omar E. Pol_, Jun 13 2012
%C Number 4 of the 14 primitive eta-products which are holomorphic modular forms of weight 1/2 listed by D. Zagier on page 30 of "The 1-2-3 of Modular Forms". - _Michael Somos_, May 04 2016
%C Also the number of partitions of n into an even number of parts, where each part occurs at most 3 times, minus the number of partitions of n into an odd number of parts, where each part occurs at most 3 times. - _Jeremy Lovejoy_, Aug 04 2020
%D D. M. Bressoud, Proofs and Confirmations, Camb. Univ. Press, 1999; p. 53, Exer. 2.2.10
%H Seiichi Manyama, <a href="/A106459/b106459.txt">Table of n, a(n) for n = 0..1000</a>
%H D. R. Hickerson, <a href="https://doi.org/10.1016/0097-3165(73)90083-6">Identities relating the number of partitions into an even and odd number of parts</a>, J. Combin. Theory Ser. A, 15 (1973), 351-353.
%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 Expansion of psi(-x) = f(x^6, x^10) - x * f(x^2, x^14) in powers of x where psi() is a Ramanujan theta function, and f(,) is Ramanujan's general theta function.
%F Expansion of q^(-1/8) * eta(q) * eta(q^4) / eta(q^2) in powers of q.
%F Euler transform of period 4 sequence [ -1, 0, -1, -1, ...].
%F G.f. is a period 1 Fourier series which satisfies f(-1 / (256 t)) = 4 (t/i)^(1/2) f(t) where q = exp(2 Pi i t).
%F Given g.f. A(x), then B(q) = q * A(q^8) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1^4*u6^4 + u1^3*u2*u3^3*u6 + 2*u1*u2^3*u3*u6^3 - u2^4*u3^4.
%F a(n) = b(8*n + 1) where b() is multiplicative with b(p^e) = Kronecker(2, p)^(e/2) if e even, b(p^e) = 0 if e odd.
%F G.f.: Product_{k>0} (1 - x^k) * (1 + x^(2*k)) = Product_{k>0} (1 - x^k) / (1 - x^(4*k - 2)).
%F G.f.: Product_{k>0} (1 - x^(2*k)) / (1 + x^(2*k - 1)) = Product_{k>0} (1 - x^(4*k)) * (1 - x^(2*k - 1)).
%F G.f.: Sum_{k>=0} a(k) * x^(8*k + 1) = Sum_{k in Z} (-1)^k * x^((4*k + 1)^2).
%F G.f.: Sum_{k>=0} (-x)^(k*(k + 1)/2) = Sum_{k in Z} x^(8*k^2 + 2*k) - x^(8*k^2 + 6*k + 1).
%F G.f. A(x) satisfies: x / A(F(x)) = F(x) = g.f. of A192540.
%F Convolution inverse of A006950.
%F |a(n)| = A010054(n) the characteristic function of triangular numbers.
%F G.f.: 1 + (-x)*(1 + (-x)^2*(1 + (-x)^3*(1 + ...))). - _Michael Somos_, Mar 03 2014
%e G.f. = 1 - x - x^3 + x^6 + x^10 - x^15 - x^21 + x^28 + x^36 - x^45 - x^55 + x^66 + ...
%e G.f. = q - q^9 - q^25 + q^49 + q^81 - q^121 - q^169 + q^225 + q^289 - q^361 - ...
%t a[ n_] := If[ SquaresR[ 1, 8 n + 1] == 2, (-1)^Quotient[ Sqrt[8 n + 1] + 1, 4], 0]; (* _Michael Somos_, Nov 18 2011 *)
%t a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, Pi/4, q] / (2^(1/2) q^(1/4)), {q, 0, 2 n}]; (* _Michael Somos_, Nov 18 2011 *)
%o (PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x + A) * eta(x^4 + A) / eta(x^2 + A), n))}
%o (PARI) {a(n) = my(x); if( issquare( 8*n + 1, &x), kronecker( 2, x))};
%Y Cf. A006950, A010054, A192540.
%K sign
%O 0,1
%A _Michael Somos_, May 02 2005