OFFSET
0,2
COMMENTS
Expansion of E(-q^2, +q) for E(q,x) = Product_{n>=0} ( 1 + x*q^n ) / ( 1 - x*q^n ).
Replacing q by -q in the g.f. gives the inverse of the g.f., whose expansion is obtained by negating every second term.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..1000
FORMULA
Euler transform of period 8 sequence [ 2, -1, -2, 0, 2, 1, -2, 0, ...]. - Michael Somos, Feb 26 2012
G.f.: prod(n>=0, (1+q*(-q^2)^n)/(1-q*(-q^2)^n) ).
G.f.: sum(n>=0, prod(k=0..n-1, 1+(-q^2)^k )/prod(k=1..n, 1-(-q^2)^k ) * q^n ).
G.f.: sum(n>=0, prod(k=0..n-1, 1+(-q^2)^k)/( prod(k=1..n, 1-(-q^2)^k) * prod(k=0..n-1, 1-q*(-q^2)^k ) ) * q^n * (-q^2)^(n*(n-1)/2) ).
EXAMPLE
1 + 2*x + 2*x^2 - 2*x^4 + 4*x^6 + 4*x^7 - 2*x^8 - 6*x^9 + 8*x^11 + ...
PROG
(PARI) N=66; q='q+O('q^N); /* that many terms */
gf = prod(n=0, N, (1+q*(-q^2)^n)/(1-q*(-q^2)^n) );
Vec(gf) /* show terms */
/* Alternative computation of the g.f. using a product form */
V=[0, -2, 1, 2, 0, -2, -1, 2]; /* note vectors are one-based */
gf=prod(n=0, N, (1-q^n)^(V[n%8+1]) );
(PARI) {a(n) = local(A); if( n<0, 0, polcoeff( prod( k=1, n, (1 - x^k + x * O(x^n) )^[ 0, -2, 1, 2, 0, -2, -1, 2][k%8 + 1]), n))} /* Michael Somos, Feb 26 2012 */
CROSSREFS
KEYWORD
sign
AUTHOR
Joerg Arndt, Aug 07 2011
STATUS
approved