OFFSET
0,3
COMMENTS
Trinomial coefficients satisfy: Sum_{k=0..2*n} A027907(n,k)*x^k = (1+x+x^2)^n.
FORMULA
G.f. satisfies: A(x) = G(x*A(x)) where A(x/G(x)) = G(x) = (1 - x + x^2)*(1 - x^2 + x^4)/(1-x)^2.
G.f.: A(x) = (1/x)*Series_Reversion( x*(1-x)*(1-x^3)*(1-x^4)/(1-x^12) ).
EXAMPLE
G.f.: A(x) = 1 + x + 2*x^2 + 6*x^3 + 20*x^4 + 69*x^5 + 248*x^6 + 923*x^7 +...
such that A(x) = G(x*A(x)) where G(x) is given by:
G(x) = (1 - x + x^2)*(1 - x^2 + x^4)/(1-x)^2 = (1-x^5)/(1-x) + x^3/(1-x)^2:
G(x) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 3*x^5 + 4*x^6 + 5*x^7 + 6*x^8 + 7*x^9 +...
...
Let A = x*A(x), then the logarithm of the g.f. A(x) equals the series:
log(A(x)) = (1 + A + A^2)*x +
(1 + 2^2*A + 3^2*A^2 + 2^2*A^3 + A^4)*x^2/2 +
(1 + 3^2*A + 6^2*A^2 + 7^2*A^3 + 6^2*A^4 + 3^2*A^5 + A^6)*x^3/3 +
(1 + 4^2*A + 10^2*A^2 + 16^2*A^3 + 19^2*A^4 + 16^2*A^5 + 10^2*A^6 + 4^2*A^7 + A^8)*x^4/4 +
(1 + 5^2*A + 15^2*A^2 + 30^2*A^3 + 45^2*A^4 + 51^2*A^5 + 45^2*A^6 + 30^2*A^7 + 15^2*A^8 + 5^2*A^9 + A^10)*x^5/5 +...
which involves the squares of the trinomial coefficients A027907(n,k).
PROG
(PARI) {a(n)=local(A=1+x); A=1/x*serreverse(x*(1-x)*(1-x^3)*(1-x^4)/(1-x^12+x*O(x^n))); polcoeff(A, n)}
(PARI) /* G.f. A(x) using the squares of the trinomial coefficients */
{A027907(n, k)=polcoeff((1+x+x^2)^n, k)}
{a(n)=local(A=1+x); for(i=1, n, A=exp(sum(m=1, n, sum(k=0, 2*m, A027907(m, k)^2 *x^k*A^k) *x^m/m)+x*O(x^n))); polcoeff(A, n)}
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Nov 04 2011
STATUS
approved