OFFSET
1,2
COMMENTS
a(n)=Sum(k*A128097(n,k), k=1..n).
FORMULA
G.f.=4[1-sqrt(1-2z-3z^2)]/[1-z+sqrt(1-2z-3z^2)]^2.
D-finite with recurrence (n-1)*(16*n-27)*(n+4)*a(n) -2*n*(16*n^2-3*n-28)*a(n-1) -3*n*(16*n-11)*(n-1)*a(n-2)=0. - R. J. Mathar, Jun 17 2016
EXAMPLE
a(3)=11 because in the Motzkin paths of length 3 (namely HHH, HUD, UDH and UHD, where H=(1,0), U=(1,1) and D=(1,-1)) all the steps, with the exception of H in UHD, touch the x-axis.
MAPLE
g:=4*(1-sqrt(1-2*z-3*z^2))/(1-z+sqrt(1-2*z-3*z^2))^2: gser:=series(g, z=0, 35): seq(coeff(gser, z, n), n=1..32);
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Feb 16 2007
STATUS
approved