OFFSET
0,4
COMMENTS
a(n) = Sum(k*A247286(n,k), 0<=k<=n).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
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
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Sep 14 2014
STATUS
approved