Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Oct 24 2023 12:51:11
%S 1,1,0,1,2,2,5,10,16,34,68,128,264,536,1073,2217,4569,9404,19594,
%T 40875,85420,179525,378069,797935,1689550,3584560,7620071,16234510,
%U 34647429,74067643,158603482,340121431,730403622,1570644830,3381674388,7289500709,15730862630,33983333681
%N Number of excursions of length n with Motzkin-steps avoiding the consecutive steps UD and HH.
%C 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.
%H Michael De Vlieger, <a href="/A329676/b329676.txt">Table of n, a(n) for n = 0..2859</a>
%H Helmut Prodinger, <a href="https://arxiv.org/abs/2310.12497">Motzkin paths of bounded height with two forbidden contiguous subwords of length two</a>, arXiv:2310.12497 [math.CO], 2023.
%F 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)).
%e a(4)=2 since we have 2 excursions of length 4 avoiding UD and HH, namely UHDH and HUHD.
%t 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 *)
%Y Cf. A329675 which counts excursions avoiding consecutive steps UD and HH.
%K nonn,walk
%O 0,5
%A _Valerie Roitner_, Nov 29 2019