OFFSET
0
COMMENTS
Also the number of excursions of length n with Motzkin-steps forbidding all consecutive steps of length 2 except UD and DU. 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. This sequence is periodic with a pre-period of length 2 (namely 1, 1) and a period of length 2 (namely 1, 0). It can be shown (via induction) that the middle column of rule 37 is eventually periodic, too. - Valerie Roitner, Apr 02 2020
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
LINKS
Robert Price, Table of n, a(n) for n = 0..1000
Andrei Asinowski, Cyril Banderier, and Valerie Roitner, Generating functions for lattice paths with several forbidden patterns, preprint, 2019.
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
S. Wolfram, A New Kind of Science
Index entries for linear recurrences with constant coefficients, signature (0, 1).
FORMULA
G.f.: (1+t-t^3)/((1-t)*(1+t)). - Valerie Roitner, Jan 13 2020
A signed form of the sequence, starting 1, 1, 1, 0, -1, 0, 1, ..., is s(n) = signum([x^n] B(x)), where B(x) = x/(1 - exp(-x)) is the e.g.f. of the Bernoulli numbers with B(1) = 1/2. - Peter Luschny, Jan 23 2023
EXAMPLE
For n=2k we only have one allowed excursion, namely (UD)^k. For n=1, however, the excursion H is allowed (since we have not attained length two or more, no forbidden consecutive step sequence has appeared yet). - Valerie Roitner, Jan 13 2020
MATHEMATICA
rule=37; rows=20; ca=CellularAutomaton[rule, {{1}, 0}, rows-1, {All, All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]], {rows-k+1, rows+k-1}], {k, 1, rows}]; (* Truncated list of each row *) Table[catri[[k]][[k]], {k, 1, rows}] (* Keep only middle cell from each row *)
CROSSREFS
KEYWORD
nonn,easy,walk
AUTHOR
Robert Price, Jan 01 2016
STATUS
approved