login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Length of n-th iterate of the mapping 00->0010, 01->100, 10->001 in A289165.
2

%I #4 Jun 29 2017 14:56:19

%S 2,4,7,12,20,34,57,96,163,277,472,803,1368,2328,3963,6745,11481,19542,

%T 33260,56612,96369,164036,279208,475288,809027,1377074,2344072,

%U 3990031,6791680,11560716,19678465,33496200,57016621,97052630

%N Length of n-th iterate of the mapping 00->0010, 01->100, 10->001 in A289165.

%t z = 22; (* number of iterates *)

%t s = {0, 0}; w[0] = StringJoin[Map[ToString, s]];

%t w[n_] := StringReplace[w[n - 1], {"00" -> "0010", "01" -> "100", "10" -> "001"}];

%t st = ToCharacterCode[w[z]] - 48 ; (* A289165 *)

%t v = Table[StringLength[w[n]], {n, 0, 30}] (* A289168 *)

%Y Cf. A289165.

%K nonn,easy

%O 0,1

%A _Clark Kimberling_, Jun 29 2017