OFFSET
1,1
COMMENTS
Compare the g.f. to the sum:
Sum_{n>=1} Sum_{k=0..n} binomial(n,k) * y^k * (x^n - y)^(n-k) = Sum_{n>=1} x^(n^2).
LINKS
Paul D. Hanna, Table of n, a(n) for n = 1..520
FORMULA
The g.f. also equals the following sums (ignoring the constant terms):
(1) Sum_{n>=1} Sum_{k=0..n} binomial(n,k) * x^(n*(n-k)) * (x^k - 1)^k.
(2) Sum_{n>=1} Sum_{k=0..n} binomial(n,k) * x^(n*k) * (x^(n-k) - 1)^(n-k).
EXAMPLE
G.f.: A(x) = 2*x - 4*x^2 + 8*x^3 - 6*x^4 + 4*x^5 - 18*x^6 + 32*x^7 - 4*x^8 - 64*x^10 + 52*x^11 + 4*x^12 + 52*x^13 - 70*x^14 + 106*x^15 - 124*x^16 - 78*x^17 - 148*x^18 + 358*x^19 + 130*x^20 + 132*x^21 - 490*x^22 + 178*x^23 - 328*x^24 + 120*x^25 - 268*x^26 + 424*x^27 - 214*x^28 + 828*x^29 - 522*x^30 +...
Illustration of the sum.
A(x) = (1*(x-1)^1 + 1*x*(x-x)^0) +
(1*(x^2-1)^2 + 2*x*(x^2-x)^1 + 1*x^4*(x^2-x^2)^0) +
(1*(x^3-1)^3 + 3*x*(x^3-x)^2 + 3*x^4*(x^3-x^2)^1 + 1*x^9*(x^3-x^3)^0) +
(1*(x^4-1)^4 + 4*x*(x^4-x)^3 + 6*x^4*(x^4-x^2)^2 + 4*x^9*(x^4-x^3)^1 + 1*x^16*(x^4-x^4)^0) +
(1*(x^5-1)^5 + 5*x*(x^5-x)^4 + 10*x^4*(x^5-x^2)^3 + 10*x^9*(x^5-x^3)^2 + 5*x^16*(x^5-x^4)^1 + 1*x^25*(x^5-x^5)^0) +
(1*(x^6-1)^6 + 6*x*(x^6-x)^5 + 15*x^4*(x^6-x^2)^4 + 20*x^9*(x^6-x^3)^3 + 15*x^16*(x^6-x^4)^2 + 6*x^25*(x^6-x^5)^1 + 1*x^36*(x^6-x^6)^0) +
(1*(x^7-1)^7 + 7*x*(x^7-x)^6 + 21*x^4*(x^7-x^2)^5 + 35*x^9*(x^7-x^3)^4 + 35*x^16*(x^7-x^4)^3 + 21*x^25*(x^7-x^5)^2 + 7*x^36*(x^7-x^6)^1 + 1*x^49*(x^7-x^7)^0) +...
Expanding further:
A(x) = (-1 + 2*x) + (1 - 4*x^2 + 2*x^3 + 2*x^4) +
(-1 + 6*x^3 - 6*x^5 - 6*x^6 + 6*x^7 + 2*x^9) +
(1 - 8*x^4 + 12*x^7 + 12*x^8 - 24*x^10 - 2*x^12 + 8*x^13 + 2*x^16) +
(-1 + 10*x^5 - 20*x^9 - 20*x^10 + 60*x^13 + 20*x^15 - 30*x^16 - 40*x^17 + 20*x^19 - 10*x^20 + 10*x^21 + 2*x^25) +
(1 - 12*x^6 + 30*x^11 + 30*x^12 - 120*x^16 - 40*x^18 + 90*x^20 + 120*x^21 - 90*x^24 - 60*x^26 + 20*x^27 + 30*x^28 - 12*x^30 + 12*x^31 + 2*x^36) +
(-1 + 14*x^7 - 42*x^13 - 42*x^14 + 210*x^19 + 70*x^21 - 210*x^24 - 280*x^25 - 70*x^28 + 420*x^29 + 210*x^31 - 140*x^33 - 210*x^34 + 42*x^35 - 14*x^37 + 42*x^39 - 14*x^42 + 14*x^43 + 2*x^49) +...
PROG
(PARI) {a(n) = polcoeff( sum(m=1, n, sum(k=0, m, binomial(m, k) * x^(k^2) * (x^m - x^k)^(m-k) +x*O(x^n))), n)}
for(n=1, 80, print1(a(n), ", "))
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Sep 28 2017
STATUS
approved