OFFSET
0,4
COMMENTS
The Motzkin step set is U=(1,1), H=(1,0) and D=(1,-1). An excursion is a path starting at (0,0), ending at (n,0) and never crossing the x-axis, i.e., staying at nonnegative altitude.
FORMULA
G.f.: ((1+t)(1+t-t^3-3t^4-(1+t)*sqrt(1-2t^3-4t^4+t^6)))/(2t^5).
D-finite with recurrence: (n+5)*a(n) -2*a(n-1) +2*(1)*a(n-2) +(-2*n-3)*a(n-3) +2*(-2*n+5)*a(n-4) +2*a(n-5) +(n-6)*a(n-6)=0. - R. J. Mathar, Jan 27 2020
EXAMPLE
a(4)=3 because we have 3 such excursions of length 4, namely UHDH, HUHD and HUDH.
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Valerie Roitner, Dec 06 2019
STATUS
approved