OFFSET
0,4
COMMENTS
Compare g.f. to: Sum_{n=-oo..+oo} (x - x^(n+1))^n = 0.
LINKS
Paul D. Hanna, Table of n, a(n) for n = 0..2050
FORMULA
G.f.: 1 + Sum_{n>=1} x^n*(1 - x^(n-1))^n + (-x)^(n^2)/(1 - x^(n+1))^n.
a(p+1) = 1 for primes p > 3 (conjecture).
EXAMPLE
G.f.: A(x) = 1 - x + x^2 - 2*x^3 + 3*x^4 - 3*x^5 + x^6 + x^7 + x^8 - 7*x^9 + 10*x^10 - 6*x^11 + x^12 + x^14 - 8*x^15 + 23*x^16 - 25*x^17 + x^18 + 17*x^19 + x^20 - 32*x^21 + 36*x^22 - 12*x^23 + x^24 - 21*x^25 + 26*x^26 - 14*x^27 + 55*x^28 - 92*x^29 + x^30 +...
where A(x) = 1 + P(x) + N(x) with
P(x) = (x-x) + (x-x^2)^2 + (x-x^3)^3 + (x-x^4)^4 + (x-x^5)^5 + (x-x^6)^6 + (x-x^7)^7 +...+ (x-x^n)^n +...
N(x) = -x/(1 - x^2) + x^4/(1-x^3)^2 - x^9/(1-x^4)^3 + x^16/(1-x^5)^4 - x^25/(1-x^6)^5 +...+ (-x)^(n^2)/(1-x^(n+1))^n +...
Explicitly,
P(x) = x^2 - x^3 + 2*x^4 - 2*x^5 + x^6 + x^8 - 5*x^9 + 7*x^10 - 5*x^11 + x^12 + x^14 - 7*x^15 + 17*x^16 - 18*x^17 + x^18 + 12*x^19 + x^20 - 25*x^21 + 29*x^22 - 11*x^23 + x^24 - 12*x^25 + 16*x^26 - 13*x^27 + 46*x^28 - 70*x^29 + x^30 +...
N(x) = -x - x^3 + x^4 - x^5 + x^7 - 2*x^9 + 3*x^10 - x^11 - x^15 + 6*x^16 - 7*x^17 + 5*x^19 - 7*x^21 + 7*x^22 - x^23 - 9*x^25 + 10*x^26 - x^27 + 9*x^28 - 22*x^29 +...
PROG
(PARI) {a(n) = local(A=1); A = sum(k=-n, n, (x - x^k)^k +x*O(x^n)); polcoeff(A, n)}
for(n=0, 100, print1(a(n), ", "))
(PARI) {a(n) = local(A=1); A = 1 + sum(k=1, n, x^k*(1 - x^(k-1))^k + (-x)^(k^2)/(1 - x^(k+1))^k +x*O(x^n)); polcoeff(A, n)}
for(n=0, 500, print1(a(n), ", "))
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Sep 03 2017
STATUS
approved