OFFSET
1,3
FORMULA
a(n) = [x^n] (x/n)*((1-n+n^2) - n^2*(n+1)*x - n*(1-(n+2)*x)*C(x) )/(1-n+n^2*x)^2, where C(x) = (1-sqrt(1-4*x))/(2*x) is the Catalan function (A000108).
PROG
(PARI) {a(n)=local(k=n, x=X+X^3*O(X^n)); (1/n)*polcoeff( x*((1-k+k^2)-k^2*(k+1)*x-k*(1-(k+2)*x)*(1-sqrt(1-4*x))/2/x)/(1-k+k^2*x)^2, n, X)}
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jun 07 2006
STATUS
approved