login
{0->1, 1->010}-transform of the infinite Fibonacci word A003849.
4

%I #5 Jun 02 2017 15:02:19

%S 1,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,1,0,1,0,

%T 1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,1,0,1,

%U 0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1

%N {0->1, 1->010}-transform of the infinite Fibonacci word A003849.

%C As a word, A003849 = 0100101001001010010100100..., and replacing each 0 by 1 and each 1 by 010 gives 10101101010101101...

%H Clark Kimberling, <a href="/A287722/b287722.txt">Table of n, a(n) for n = 1..10000</a>

%t s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 10] (* A003849 *)

%t w = StringJoin[Map[ToString, s]]

%t w1 = StringReplace[w, {"0" -> "1", "1" -> "010"}]

%t st = ToCharacterCode[w1] - 48 (* A287722 *)

%t Flatten[Position[st, 0]] (* A287723 *)

%t Flatten[Position[st, 1]] (* A287724 *)

%Y Cf. A287723, A287724.

%Y easy

%K nonn

%O 1

%A _Clark Kimberling_, Jun 02 2017