login
Trajectory of 1 under the morphism 1 -> 12, 2 -> 23, 3 -> 31.
2

%I #24 Oct 04 2020 23:39:35

%S 1,2,2,3,2,3,3,1,2,3,3,1,3,1,1,2,2,3,3,1,3,1,1,2,3,1,1,2,1,2,2,3,2,3,

%T 3,1,3,1,1,2,3,1,1,2,1,2,2,3,3,1,1,2,1,2,2,3,1,2,2,3,2,3,3,1,2,3,3,1,

%U 3,1,1,2,3,1,1,2,1,2,2,3,3,1,1,2,1,2,2,3,1,2,2,3

%N Trajectory of 1 under the morphism 1 -> 12, 2 -> 23, 3 -> 31.

%C The morphism 1->12, 2->21 gives the {1,2} version of the Thue-Morse sequence A001285, cf. A010060.

%C The morphism 0->01, 1->12, 2->20 gives the generalized Thue-Morse sequence A071858.

%H Chai Wah Wu, <a href="/A245555/b245555.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>

%F a(n) = A071858(n+1) + 1. - _Michel Dekking_, Sep 29 2020

%t Nest[ Function[ l, {Flatten[(l /. {1 -> {1, 2}, 2 -> {2, 3}, 3 -> {3, 1}})] }], {1}, 9]

%o (PARI) {a(n) = my(v = [1]); if( n<1, 0, while( #v<n, v = concat( vector(#v, i, [[1,2], [2,3], [3,1]] [v[i]]))); v[n])}; /* _Michael Somos_, Aug 05 2014 */

%Y Cf. A001285, A010060, A092782, A105083, A245553, A245554.

%Y Essentially the same as A071858.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Aug 03 2014