OFFSET
2,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 2..1000
FORMULA
a(n) = Sum_{k=0..floor(n/2)} k*A109193(n,k).
a(n) = 2*A109196(n).
G.f.: (1-z-sqrt(1-2*z-3*z^2))/(1-2*z-3*z^2).
a(n) = 2*Sum_{k=1..n} Sum_{j=0..n} binomial(j,-n-2*k+2*j)*binomial(n,j), n>1. - Vladimir Kruchinin, Oct 12 2011
a(n) ~ 3^n/2 * (1-sqrt(3/(Pi*n))). - Vaclav Kotesovec, Nov 05 2016
D-finite with recurrence n*a(n) +(-4*n+3)*a(n-1) +(-2*n+3)*a(n-2) +3*(4*n-9)*a(n-3) +9*(n-3)*a(n-4)=0. - R. J. Mathar, Jul 26 2022
EXAMPLE
a(3)=6 because we have the following 7 (=A002426(3)) Grand Motzkin paths of length 3: hhh, hu(d), hd(u), u(d)h, d(u)h, uh(d) and dh(u); they have a total of 6 returns to the x-axis (shown between parentheses).
MAPLE
g:=(1-z-sqrt(1-2*z-3*z^2))/(1-2*z-3*z^2): gser:=series(g, z=0, 30): seq(coeff(gser, z^n), n=2..28);
MATHEMATICA
Drop[CoefficientList[Series[(1-x-Sqrt[1-2*x-3*x^2])/(1-2*x-3*x^2), {x, 0, 30}], x], 2] (* Vaclav Kotesovec, Nov 05 2016 *)
PROG
(PARI) x='x+O('x^50); Vec((1-x-sqrt(1-2*x-3*x^2))/(1-2*x-3*x^2)) \\ G. C. Greubel, Mar 02 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jun 22 2005
STATUS
approved