A105141 Triangle read by rows, based on the morphism f: 1->{1,2,1}, 2->{2,3,2}, 3->{3,1,3}. First row is 1. If current row is a,b,c,..., then the next row is a,b,c,...,f(a),f(b),f(c),...
1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 1, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 1, 1, 2, 1, 1
Offset: 0
Links
- F. M. Dekking, Recurrent sets, Advances in Mathematics, vol. 44, no. 1 (1982), 78-104; page 96, section 4.10.
Programs
-
Mathematica
s[n_] := n /. {1 -> {1, 2, 1}, 2 -> {2, 3, 2}, 3 -> {3, 1, 3}}; t[a_] := Join[a, Flatten[s /@ a]]; Flatten[ NestList[t, {1}, 4]]
Comments