OFFSET
0,5
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 on the x-axis and never crossing the x-axis, i.e., staying at nonnegative altitude.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..2859
Helmut Prodinger, Motzkin paths of bounded height with two forbidden contiguous subwords of length two, arXiv:2310.12497 [math.CO], 2023.
FORMULA
G.f.: (1+t^2+t^3-sqrt(t^6+2*t^5-3*t^4-6*t^3-2*t^2+1))/(2*t^2*(1+t)).
EXAMPLE
a(4)=2 since we have 2 excursions of length 4 avoiding UD and HH, namely UHDH and HUHD.
MATHEMATICA
CoefficientList[Series[(1 + x^2 + x^3 - Sqrt[x^6 + 2*x^5 - 3*x^4 - 6*x^3 - 2*x^2 + 1])/(2*x^2*(1 + x)), {x, 0, 40}], x] (* Michael De Vlieger, Oct 24 2023 *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Valerie Roitner, Nov 29 2019
STATUS
approved