login
{101->2}-transform of the infinite Fibonacci word A003849.
3

%I #8 Aug 28 2017 04:21:12

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

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

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

%N {101->2}-transform of the infinite Fibonacci word A003849.

%C The sequences p = A032766, q = A284395, r = A284396, of positions of 0,1,2, respectively, partition the positive integers. Let t,u,v be the slopes of p, q, r, respectively. Then t = 3/2, u = (9+3*sqrt(5))/2, v = (3+3*sqrt(5))/2, and 1/t + 1/u + 1/v = 1.

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

%e As a word, A003849 = 01001010010010100..., and replacing each 101 by 2 gives 01002001002002001...

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

%t w = StringJoin[Map[ToString, s]]; w1 = StringReplace[w, {"101" -> "2"}]

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

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

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

%t Flatten[Position[st, 2]] (* A284396 *)

%Y Cf. A003849, A032766, A284395, A284396.

%K nonn,easy

%O 1,5

%A _Clark Kimberling_, May 02 2017