A329684 Number of excursions of length n with Motzkin-steps forbidding all consecutive steps of length 2 except UD and HH.
1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0
Examples
a(2)=2 since UD and HH are allowed. For n different from 2, only the excursion H^n is allowed.
Links
- Index entries for linear recurrences with constant coefficients, signature (1).
Programs
-
Mathematica
PadRight[{1, 1, 2}, 100, 1] (* Paolo Xausa, Aug 28 2024 *)
Formula
G.f.: (1+t^2-t^3)/(1-t).
For n >= 0, a(2) = 2, otherwise a(n) = 1. - Elmo R. Oliveira, Jun 16 2024
Comments