A284387 {010->2}-transform of the infinite Fibonacci word A003849.
2, 2, 1, 0, 2, 2, 1, 0, 2, 1, 0, 2, 2, 1, 0, 2, 2, 1, 0, 2, 1, 0, 2, 2, 1, 0, 2, 1, 0, 2, 2, 1, 0, 2, 2, 1, 0, 2, 1, 0, 2, 2, 1, 0, 2, 2, 1, 0, 2, 1, 0, 2, 2, 1, 0, 2, 1, 0, 2, 2, 1, 0, 2, 2, 1, 0, 2, 1, 0, 2, 2, 1, 0, 2, 1, 0, 2, 2, 1, 0, 2, 2, 1, 0, 2, 1
Offset: 1
Examples
As a word, A003849 = 01001010010010100..., and replacing consecutively (not simultaneously!) each 010 by 2 gives 2210221021...
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13] (* A003849 *) w = StringJoin[Map[ToString, s]] w1 = StringReplace[w, {"010" -> "2"}] st = ToCharacterCode[w1] - 48 (* A284387 *) Flatten[Position[st, 0]] (* A214971 *) Flatten[Position[st, 1]] (* A003231 *) Flatten[Position[st, 2]] (* A276886 *)
Extensions
Comment edited by Clark Kimberling, Oct 14 2017
Comments