login
A247287
Number of weak peaks in all Motzkin paths of length n. A weak peak of a Motzkin path is a vertex on the top of a hump. A hump is an upstep followed by 0 or more flatsteps followed by a downstep. For example, the Motzkin path u*duu*h*h*dd, where u=(1,1), h=(1,0), d(1,-1), has 4 weak peaks (shown by the stars).
2
0, 0, 1, 4, 13, 38, 108, 304, 857, 2426, 6902, 19728, 56622, 163092, 471205, 1365008, 3963321, 11530786, 33607190, 98105616, 286795300, 839470664, 2460038427, 7216652488, 21190820678, 62279238828, 183185851903, 539220930004, 1588341106957, 4681678922366
OFFSET
0,4
COMMENTS
a(n) = Sum(k*A247286(n,k), 0<=k<=n).
LINKS
FORMULA
G.f.: (1-z-sqrt(1-2*z-3*z^2))/(2*(1-z)^2*sqrt(1-2*z-3*z^2)).
a(n) ~ 3^(n+3/2) / (8*sqrt(Pi*n)). - Vaclav Kotesovec, Sep 16 2014
D-finite with recurrence n*a(n) +(-5*n+3)*a(n-1) +2*(3*n-4)*a(n-2) +2*(n-1)*a(n-3) +(-7*n+16)*a(n-4) +3*(n-3)*a(n-5)=0. - R. J. Mathar, Jul 24 2022
EXAMPLE
a(3)=4 because the Motzkin paths hhh, hu*d, u*dh, and u*h*d have 0, 1, 1, and 2 weak peaks (shown by the stars).
MAPLE
g := ((1-z-sqrt(1-2*z-3*z^2))*(1/2))/((1-z)^2*sqrt(1-2*z-3*z^2)): gser := series(g, z = 0, 34): seq(coeff(gser, z, n), n = 0 .. 32);
PROG
(PARI) z='z+O('z^66); concat([0, 0], Vec((1-z-sqrt(1-2*z-3*z^2))/(2*(1-z)^2*sqrt(1-2*z-3*z^2)))) \\ Joerg Arndt, Sep 14 2014
CROSSREFS
Sequence in context: A094706 A325927 A056014 * A159036 A058693 A027076
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Sep 14 2014
STATUS
approved