login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A329692
Number of excursions of length n with Motzkin-steps avoiding the consecutive steps UU, HH, HD and DH.
2
1, 1, 1, 1, 1, 2, 2, 4, 5, 8, 13, 18, 32, 46, 77, 123, 192, 325, 506, 849, 1375, 2245, 3750, 6085, 10206, 16798, 27936, 46689, 77389, 130048, 216717, 363701, 610657, 1023965, 1726537, 2902221, 4898323, 8265964, 13957522, 23622321, 39949012, 67710936, 114768860, 194709672, 330693182
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
Sequence in context: A093335 A093333 A116085 * A216198 A369708 A085570
KEYWORD
nonn,walk
AUTHOR
Valerie Roitner, Dec 06 2019
STATUS
approved