%I
%S 0,0,1,1,0,1,1,0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1,0,0,0,0,0,1,1,0,1,1,0,
%T 0,0,0,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0,0,0,0,0,1,1,0,1,1,0,0,0,
%U 0,0,1,1,0,1,1,0,1,1,0,1,1,0,0,0,0,0
%N 0limiting word of the mapping 00>1000, 10>01, starting with 00.
%C Iterates of the mapping, starting with 00:
%C 00
%C 1000
%C 011000
%C 01011000
%C 0011011000
%C 10001011011000
%C 011000011011011000
%C 0101100001011011011000
%C 00110110000011011011011000
%C 1000101101100010001011011011011000
%C The 0limiting word is the limit of the nth iterates for n = 0 mod 4.
%C Conjecture: the number of letters (0's and 1's) in the nth iterate is given by A288732(n), for n >= 0.
%C From _Michel Dekking_, Mar 29 2018: (Start)
%C Here is a proof of the conjecture. We note first that the mapping
%C SR: 00>1000, 10>01, is an algorithmic procedure given by StringReplace in Mathematica (see also comments of A289035). This makes it hard to describe iterates of SR. However, in this particular case the iterates have a remarkable structure. Let
%C B0:=0000, B1:=00010001, B2:=000, B3:=00001.
%C Moreover let S:=011. We call S a separator: the middle 1 in S is not part of the 2block 00, nor of the 2block 10, which makes this middle 1 inert for SR. The consequence is that the action of SR is contextfree between two separators.
%C Let W(n) = u SR^n(00) u^{1} be the conjugate of S by the word u=000, then of course W(n) and SR^n(00) have the same length.
%C Examples:
%C W(0) = SR^{0}(00) = 00,
%C W(1) = 0001, since SR^{1}(00) = 1000,
%C W(2) = 000011, since SR^{2}(00) = 011000,
%C W(3) = 00001011, since SR^{3}(00) = 01011000,
%C W(4) = 0000011011, since SR^{4}(00) = 0011011000.
%C W(5) = 00010001011011, since SR^{5}(00) = 10001011011000.
%C The action of SR on a Bblock between separators is approximately (ignoring the borders of the words) given by
%C S B(j) S > S B(j+1) S for j=0,2,3 and
%C S B(1) S > S B(2) S B(2) S.
%C It follows from this that W(n) is a concatenation of just separators S and words B(j) if n equals j modulo 4, as soon as n>1.
%C The separators occur as singletons between two B(j)'s, or as a chain SS...S. The singletons and the chains are always preceded by 00 or by 01. More precisely: in W(n) they are all preceded by 00 if n is even, and always by 01 if n is odd. If a chain of length L in W(n) is preceded by 00, then it generates a chain of length L in W(n+1), but if it is preceded by 01, then it generates a chain of length L+1 in W(n+1).
%C It follows from all this that the best way to describe the iterates of SR is to take cycles of length 4, i.e., to give an expression for W(4k+j).
%C Here is what happens for j=3: the number of B(j) blocks in W(4k+3) equals 2^k; actually this happens for all j because of the SB(1)S > S B(2)SB(2)S action. For the same reason the number of singleton Sblocks equals 2^{k1}. The Schains will only have an odd length. The start is from a singleton S for k=0. For k=1 there is a singleton S, and a chain of length 3. The number of Schains of length 2L1 in W(4k+3) is equal to 2^{kL} for L=1,2,..,k1, including the singletons. In addition there is an Schain of length 2k+1 (generated by the chain of length 3 in W(7)).
%C The length of W(4k+3) for k>0 will therefore be equal to
%C W(4k+3) = 5*2^k + 3*[ 1*2^{k1} + 3*2^{k2}+ ... +(2k3)*2 + (2k1)*1] + 3*(2k+1).
%C Here the sum in square brackets is the convolution of the powers of two with the odd numbers (for n=k1, see A050488), which gives
%C W(4k+3) = 5*2^k + 3*[ 3*2^k  2(k1) 5] + 6*k+3 = 14*2^k  6 = 7*2^{k+1} 6.
%C This proves W(4k+3) = A288732(4k+3).
%C Similarly one shows that W(4k+j) = A288732(4k+j) for the other j.
%C (End)
%H Clark Kimberling, <a href="/A288729/b288729.txt">Table of n, a(n) for n = 1..10000</a>
%e The first three nth iterates for n == 0 mod 3 are
%e 00
%e 0011011000
%e 00110110000011011011011000
%t s = {0, 0}; w[0] = StringJoin[Map[ToString, s]];
%t w[n_] := StringReplace[w[n  1], {"00" > "1000", "10" > "01"}]
%t Table[w[n], {n, 0, 8}]
%t st = ToCharacterCode[w[20]]  48 (* A288729 *)
%t Flatten[Position[st, 0]] (* A288730 *)
%t Flatten[Position[st, 1]] (* A288731 *)
%t Table[StringLength[w[n]], {n, 0, 20}] (* A288732 *)
%Y Cf. A288729, A288730, A288731, A288732, A288733 (1limiting word), A288741 (3limiting word).
%K nonn,easy
%O 1
%A _Clark Kimberling_, Jun 16 2017
