OFFSET
0,2
FORMULA
G.f. A(x) = A(x^2*G)*G*(1-x^2*G)/(1-x), where G(x) is the g.f. of the Motzkin numbers (A001006): G = (1 + x*G + x^2*G^2).
PROG
(PARI) {a(n)=local(F=1+x+x^2, G=serreverse(x/(F+x^2*O(x^n)))/x, H=1+x, A); for(i=0, n, H=G*subst(H, x, x^2*G)+x^2*O(x^n)); A=(x*H-y*subst(H, x, x*y))/(x*subst(F, x, y)-y); polcoeff(polcoeff(A, n, x), n, y)}
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jul 27 2006
STATUS
approved