OFFSET
1,2
COMMENTS
Compare to identity: 1 + 2*Sum_{n>=0} x^(n^2) = Product_{n>=1} (1 - x^(2*n)) * (1 + x^n)^2 / (1 + x^(2*n))^2.
LINKS
Paul D. Hanna, Table of n, a(n) for n = 1..250
FORMULA
G.f. A(x) = Sum_{n>=0} a(n)*x^n satisfies the following formulas.
(1) B(x) = Product_{k>=1} (1 - x^(2*k)) * (1 + x^k + A(x))^2 / (1 + x^(2*k) + A(x))^2.
(2) B(x) = Sum_{n>=0} Product_{k=1..n} (x^(2*k-1) + A(x)).
(3) B(x) = Sum_{n>=0} x^(n^2) / Product_{k=0..n} (1 - x^(2*k)*A(x)).
(4) B(x) = (x + A(x))/(1 + F(1)), where F(n) = -(x^(2*n+1) + A(x))/(1 + (x^(2*n+1) + A(x)) + F(n+1)), a continued fraction.
EXAMPLE
G.f.: A(x) = x - 4*x^2 + 18*x^3 - 95*x^4 + 553*x^5 - 3456*x^6 + 22657*x^7 - 153716*x^8 + 1070043*x^9 - 7599246*x^10 + 54840210*x^11 - 400989178*x^12 + ...
By definition, A = A(x) allows for the following expressions to equal
B(x) = 1 + (x + A) + (x + A)*(x^3 + A) + (x + A)*(x^3 + A)*(x^5 + A) + (x + A)*(x^3 + A)*(x^5 + A)*(x^7 + A) + (x + A)*(x^3 + A)*(x^5 + A)*(x^7 + A)*(x^9 + A) + ...
B(x) = (1 - x^2)*(1 + x + A)^2/(1 + x^2 + A)^2 * (1 - x^4)*(1 + x^2 + A)^2/(1 + x^4 + A)^2 * (1 - x^6)*(1 + x^3 + A)^2/(1 + x^6 + A)^2 * (1 - x^8)*(1 + x^4 + A)^2/(1 + x^8 + A)^2 * ...
where B(x) begins
B(x) = 1 + 2*x - 2*x^2 + 8*x^3 - 41*x^4 + 250*x^5 - 1584*x^6 + 10464*x^7 - 71330*x^8 + 498144*x^9 - 3546004*x^10 + 25635440*x^11 - 187708130*x^12 + ...
PROG
(PARI) {a(n) = my(A=[0, 1]); for(i=1, n, A=concat(A, 0);
A[#A] = -polcoeff( sum(m=0, #A, prod(k=1, m, x^(2*k-1) + Ser(A)) ) - prod(m=1, #A, (1 - x^(2*m))*(1 + x^m + Ser(A))^2/(1 + x^(2*m) + Ser(A))^2 ), #A-1)); H=A; A[n+1]}
for(n=1, 30, print1(a(n), ", "))
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Feb 16 2024
STATUS
approved