%I #30 Aug 10 2024 21:39:09
%S 0,0,1,0,0,1,1,0,1,1,0,1,1,1,0,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,1,
%T 1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,
%U 1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1
%N Fixed point of the mapping 00->0010, 01->011, 10->011, starting with 00.
%C Conjecture: the number of letters (0's and 1's) in the n-th iterate of the mapping is given by A000124.
%C From _Michel Dekking_, Oct 16 2022: (Start)
%C Proof of the conjecture: let N0(n) be the number of 0's, and N1(n) be the number of 1's in the n-th iterate of the StringReplace mapping defining (a(n)).
%C CLAIM: N0(n) = n+2, N1(n) = n(n+1)/2 for all n=1,2,...
%C The proof is by induction. We have N0(1) =3, N1(1) = 1. The crucial observation is that 00 only occurs at position 1 and position 4, and that at position 4 it always is preceded by 1. Moreover, each 0 (except the first one), combines either as 01 or as 10, which both give 011 in the next iterate.
%C So N0(n+1) = N0(n) + 1 = n+3, and
%C N1(n+1) = N1(n) + N0(n) - 1 = n(n+1)/2 + n+1 = (n+1)(n+2)/2.
%C This proves the conjecture: N0(n)+N1(n) = (n^2 +3n+4)/2 = A000124(n+1) for n=1,2,.... (End)
%H Clark Kimberling, <a href="/A288936/b288936.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A023532(n-6), for n >= 7. - _Alan Michael Gómez Calderón_, Aug 01 2024
%e The first six iterates of the mapping:
%e 00
%e 0010
%e 0010011
%e 00100110111
%e 0010011011011111
%e 0010011011011101111111
%t z = 11; (* number of iterates *)
%t s = {0, 0}; w[0] = StringJoin[Map[ToString, s]];
%t w[n_] := StringReplace[w[n - 1], {"00" -> "0010", "01" -> "011", "10" -> "011"}]
%t TableForm[Table[w[n], {n, 0, 10}]]
%t st = ToCharacterCode[w[z]] - 48 (* A288936 *)
%t Flatten[Position[st, 0]] (* A288937 *)
%t Flatten[Position[st, 1]] (* A288938 *)
%t Table[StringLength[w[n]], {n, 0, 20}] (* A000124 conjectured *)
%Y Cf. A000124, A023532, A288937, A288938.
%K nonn,easy
%O 1
%A _Clark Kimberling_, Jun 28 2017