%I #26 Feb 18 2021 09:27:46
%S 1,3,2,1,2,0,1,3,2,0,1,2,1,3,2,1,2,0,1,2,1,3,2,0,1,3,2,1,2,0,1,3,2,0,
%T 1,2,1,3,2,0,1,3,2,1,2,0,1,2,1,3,2,1,2,0,1,3,2,0,1,2,1,3,2,1,2,0,1,2,
%U 1,3,2,0,1,3,2,1,2,0,1,2,1,3,2,1,2,0,1,3,2,0,1,2,1,3,2,0,1,3,2,1,2,0,1,3,2,0,1,2,1,3,2,1,2,0,1
%N Trajectory of 1 under repeated applications of the morphism 0->12, 1->13, 2->20, 3->21.
%C This is the 2-block coding of the Thue-Morse word A010060.
%C Essentially equal to A005681. - _Michel Dekking_, Feb 18 2021
%H A. Parreau, M. Rigo, E. Rowland, and E. Vandomme, <a href="http://arxiv.org/abs/1405.3532">A new approach to the 2-regularity of the l-abelian complexity of 2-automatic sequences</a>, arXiv preprint arXiv:1405.3532 [cs.FL], 2014. See Example 17.
%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>
%p mor := proc(L)
%p local Lout,w ;
%p if nops(L) = 0 then
%p [1,2] ;
%p else
%p Lout := [] ;
%p for w in L do
%p if w = 0 then
%p Lout := [op(Lout),1,2] ;
%p elif w =1 then
%p Lout := [op(Lout),1,3] ;
%p elif w =2 then
%p Lout := [op(Lout),2,0] ;
%p else
%p Lout := [op(Lout),2,1] ;
%p end if;
%p end do:
%p Lout ;
%p end if;
%p end proc:
%p L := [1] ;
%p for r from 0 to 10 do
%p Lold := L ;
%p L := mor(Lold) ;
%p for n from 1 to nops(Lold) do
%p if op(n,L) = op(n,Lold) then
%p printf("%d,",op(n,L)) ;
%p else
%p break;
%p end if;
%p end do:
%p print() ;
%p end do: # _R. J. Mathar_, Oct 25 2014
%t (* This gives the first 128 terms. *)
%t SubstitutionSystem[{0 -> {1, 2}, 1 -> {1, 3}, 2 -> {2, 0}, 3 -> {2, 1}}, {1}, {{7}}] (* _Eric Rowland_, Oct 02 2016 *)
%Y Cf. A010060, A005681.
%K nonn
%O 0,2
%A _N. J. A. Sloane_, Jul 21 2014
|