OFFSET
0,6
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^2+t^3-sqrt(1-2*t^2-2*t^3+t^4-2*t^5+t^6))/(2*t^3).
EXAMPLE
a(7)=4 since we have the following 4 excursions of length 7: UHUDDUD, UHUDUDD, UDUHUDD and HUDUDUD.
MATHEMATICA
CoefficientList[Series[(1 + x)*(1 - x^2 + x^3 - Sqrt[1 - 2 x^2 - 2 x^3 + x^4 - 2 x^5 + x^6])/(2 x^3), {x, 0, 50}], x] (* Wesley Ivan Hurt, Dec 02 2021 *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Valerie Roitner, Dec 06 2019
STATUS
approved