|
EXAMPLE
|
G.f.: A(x) = 1 + 4*x + 22*x^2 + 184*x^3 + 2094*x^4 + 30300*x^5 +...
where
A(x) = (1+x)/(1-x) + (1+2*x-x^2)*(2*x-x^2)/(1-x)^4 + (1+3*x-3*x^2+x^3)*(3*x-3*x^2+x^3)^2/(1-x)^9 + (1+4*x-6*x^2+4*x^3-x^4)*(4*x-6*x^2+4*x^3-x^4)^3/(1-x)^16 +...
Compare the g.f. to the identity:
1 = (1+x)/(1-x) - (1+2*x-x^2)*(2*x-x^2)/(1-x)^4 + (1+3*x-3*x^2+x^3)*(3*x-3*x^2+x^3)^2/(1-x)^9 - (1+4*x-6*x^2+4*x^3-x^4)*(4*x-6*x^2+4*x^3-x^4)^3/(1-x)^16 +-...
|
|
PROG
|
(PARI) {a(n)=polcoeff(sum(m=1, n+1, (2 - (1-x)^m) * (1 - (1-x)^m +x*O(x^n))^(m-1)/(1-x+x*O(x^n))^(m^2)), n)}
for(n=0, 20, print1(a(n), ", "))
(PARI) {a(n)=polcoeff(1+sum(m=1, n\2+1, 2*(2 - (1-x)^(2*m)) * (1 - (1-x)^(2*m) +x*O(x^n))^(2*m-1)/(1-x+x*O(x^n))^(4*m^2)), n)}
for(n=0, 20, print1(a(n), ", "))
(PARI) {a(n)=polcoeff(-1+sum(m=0, n\2, 2*(2 - (1-x)^(2*m+1)) * (1 - (1-x)^(2*m+1) +x*O(x^n))^(2*m)/(1-x+x*O(x^n))^((2*m+1)^2)), n)}
for(n=0, 20, print1(a(n), ", "))
|