%I
%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 morphism 1 > 1,2; 2 > 2,3; 3 > 3,1.
%C The morphism 1>1,2; 2>2,1 gives the {1,2} version of the ThueMorse sequence A001285, cf. A010060.
%C The morphism 0>0,1; 1>1,2; 2>2,0 gives the generalized ThueMorse 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>
%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, A071858, A092782, A105083, A245553, A245554.
%K nonn
%O 1,2
%A _N. J. A. Sloane_, Aug 03 2014
