OFFSET
0,2
FORMULA
1->{1, 2, 2, 1}, 2->{2, 3, 3, 2}, 3->{3, 1, 1, 3}
MATHEMATICA
s[1] = {1, 2, 2, 1}; s[2] = {2, 3, 3, 2}; s[3] = {3, 1, 1, 3}; t[a_] := Flatten[s /@ a] p[0] = {1}; p[1] = t[p[0]]; p[n_] := t[p[n - 1]] aa = p[4]
SubstitutionSystem[{1->{1, 2, 2, 1}, 2->{2, 3, 3, 2}, 3->{3, 1, 1, 3}}, {1}, {5}][[1]] (* Harvey P. Dale, Feb 06 2022 *)
CROSSREFS
KEYWORD
nonn,uned
AUTHOR
Roger L. Bagula, May 11 2005
EXTENSIONS
Corrected formula - Jon Perry, Oct 08 2012
STATUS
approved