OFFSET
1,5
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
EXAMPLE
As a word, A003849 = 01001010010010100..., and replacing each 101 by 2 gives 01002001002002001...
MATHEMATICA
s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 13] (* A003849 *)
w = StringJoin[Map[ToString, s]]; w1 = StringReplace[w, {"101" -> "2"}]
st = ToCharacterCode[w1] - 48 (* A284394 *)
Flatten[Position[st, 0]] (* A032766 *)
Flatten[Position[st, 1]] (* A284395 *)
Flatten[Position[st, 2]] (* A284396 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 02 2017
STATUS
approved