login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A128098
Number of steps that touch the x-axis in all Motzkin paths of length n.
1
1, 4, 11, 30, 80, 214, 574, 1548, 4197, 11440, 31339, 86252, 238407, 661584, 1842585, 5148960, 14432643, 40569804, 114339777, 323031750, 914683602, 2595411126, 7378861196, 21016701652, 59962687675, 171353419536, 490407962229
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
Cf. A128097.
Sequence in context: A110034 A340824 A114726 * A341104 A019495 A019496
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Feb 16 2007
STATUS
approved