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”).
%I #30 Aug 03 2024 12:01:21
%S 1,1,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,
%T 0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,
%U 1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1
%N Number of excursions of length n with Motzkin-steps forbidding all consecutive steps of length 2 except UH, UD, HU and DD.
%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.
%C This sequence is periodic with a pre-period of length 2 (namely 1, 1) and a period of length 3 (namely 1, 1, 0).
%C Decimal expansion of 11099/99900. - _Elmo R. Oliveira_, Jun 16 2024
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1).
%F G.f.: (1+t+t^2-t^4)/(1-t^3).
%F a(n) = a(n-3) for n > 4. - _Elmo R. Oliveira_, Jun 16 2024
%e a(6) = 1 because we only have one such excursion of length 6, namely UHUDDD. Similarly a(8) = 1, since only UHUHUDDD is allowed.
%e More generally, the only possibilities are (HU)^kD^k, U(HU)^(k-1)D^k (aside from trivial cases of length zero or one).
%Y Cf. A329680, A329683, A329684.
%Y Essentially the same as A204418 and A011655.
%K nonn,walk,easy
%O 0
%A _Valerie Roitner_, Nov 29 2019