|
|
A219762
|
|
Start with 0; repeatedly apply the map {0->012, 1->120, 2->201} to the odd-numbered terms and {0->210, 1->021, 2->102} to the even-numbered terms.
|
|
3
|
|
|
0, 1, 2, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 2, 1, 0, 1, 2, 0, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
An infinite squarefree sequence over {0,1,2} that is not generated by a CDOL system.
|
|
REFERENCES
|
A. Salomaa, Jewels of Formal Language Theory. Computer Science Press, Rockville, MD, 1981, p. 16, Problem 13.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
0 -> 012 -> 012021201 -> ...
|
|
MATHEMATICA
|
f[lst_] := Replace[MapIndexed[{#1, #2[[1]]}&, lst], {{0, n_} :> If[OddQ[n], {0, 1, 2}, {2, 1, 0}], {1, n_} :> If[OddQ[n], {1, 2, 0}, {0, 2, 1}], {2, n_} :> If[OddQ[n], {2, 0, 1}, {1, 0, 2}]}, 1] // Flatten; Nest[f, {0}, 5] (* Jean-François Alcover, Mar 07 2014 *)
|
|
PROG
|
(Haskell)
a219762 = subtract 1 . a099054 . subtract 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|