|
EXAMPLE
|
G.f. A(x) = 1 + x + 2*x^2 + 9*x^3 + 46*x^4 + 253*x^5 + 1467*x^6 + 8842*x^7 + 54878*x^8 + 348489*x^9 + 2254007*x^10 + 14799922*x^11 + 98405915*x^12 + ...
such that A(x) = P(x)/Q(x) where
P(x) = 1/(1 - x)^2 + 2*x*A(x)^2/(1 - x*A(x))^2 + 3*x^2*A(x)^4/(1 - x*A(x)^2)^2 + 4*x^3*A(x)^6/(1 - x*A(x)^3)^2 + 5*x^4*A(x)^8/(1 - x*A(x)^4)^2 + ...
Q(x) = 1/(1 - x*A(x)) + 2*x*A(x)/(1 - x*A(x)^2) + 3*x^2*A(x)^2/(1 - x*A(x)^3) + 4*x^3*A(x)^3/(1 - x*A(x)^4) + 5*x^4*A(x)^4/(1 - x*A(x)^5) + ...
equivalently,
P(x) = 1/(1 - x*A(x)^2)^2 + 2*x/(1 - x*A(x)^3)^2 + 3*x^2/(1 - x*A(x)^4)^2 + 4*x^3/(1 - x*A(x)^5)^2 + 5*x^4/(1 - x*A(x)^6)^2 + ...
Q(x) = 1/(1 - x*A(x))^2 + x*A(x)/(1 - x*A(x)^2)^2 + x^2*A(x)^2/(1 - x*A(x)^3)^2 + x^3*A(x)^3/(1 - x*A(x)^4)^2 + x^4*A(x)^4/(1 - x*A(x)^5)^2 + ...
explicitly,
P(x) = 1 + 4*x + 14*x^2 + 54*x^3 + 241*x^4 + 1214*x^5 + 6651*x^6 + 38566*x^7 + 232727*x^8 + 1446432*x^9 + 9196742*x^10 + 59545914*x^11 + 391304285*x^12 + ...
Q(x) = 1 + 3*x + 9*x^2 + 30*x^3 + 120*x^4 + 562*x^5 + 2939*x^6 + 16523*x^7 + 97551*x^8 + 596461*x^9 + 3744416*x^10 + 23996814*x^11 + 156370334*x^12 + ...
|
|
PROG
|
(PARI) {a(n) = my(A=1+x+x*O(x^n), P=1, Q=1);
for(i=0, n,
P = sum(m=0, n, (m+1)*x^m*A^(2*m)/(1 - x*A^m + x*O(x^n))^2 );
Q = sum(m=0, n, (m+1)*x^m*A^m/(1 - x*A^(m+1) + x*O(x^n)) );
A = P/Q); polcoeff(A, n)}
for(n=0, 20, print1(a(n), ", "))
(PARI) {a(n) = my(A=1+x+x*O(x^n), P=1, Q=1);
for(i=0, n,
P = sum(m=0, n, (m+1)*x^m/(1 - x*A^(m+2) + x*O(x^n))^2 );
Q = sum(m=0, n, x^m*A^m/(1 - x*A^(m+1) + x*O(x^n))^2 );
A = P/Q); polcoeff(A, n)}
for(n=0, 20, print1(a(n), ", "))
(PARI) /* As generated by Finite Differences in the columns of table A340940 */
{A340940(k, n) = my(A=[1, 1]); for(i=1, n, A=concat(A, 0); H=A; A=concat(A, 0);
H[#A-1] = -polcoeff( sum(m=0, #A, x^m/(1 - x*Ser(A)^(m+k)) ) - sum(m=0, #A, x^m*Ser(A)^m/(1 - x*Ser(A)^(k*m+k-1)) ), #A)/(k-1); A=H); A[n+1] }
for(n=0, 20, if(n<2, print1("1, "), print1( Vec(-(x-1)^n*Ser(vector(n+1, k, A340940(k+1, n))))[n], ", ") ))
|