The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A267371 Limiting sequence formed by starting with 01 and iteratively concatenating existing string with the shortest prefix that appears only once. 6

%I #19 Mar 23 2024 19:48:07

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

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

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

%N Limiting sequence formed by starting with 01 and iteratively concatenating existing string with the shortest prefix that appears only once.

%H Michael S. Branicky, <a href="/A267371/b267371.txt">Table of n, a(n) for n = 1..10000</a>

%e Starting with 01, the shortest prefix occurring only once is 0, so the next string is (01)(0) = 010. After that it becomes (010)(01) = 01001, etc.

%t preLo[{np_, s_}] := NestWhile[#+1&, np, StringCount[s, StringTake[s ,#], Overlaps->True]>1&]

%t a267371[n_] := Map[Boole[#=="1"]&, Characters[Last[Nest[{preLo[#], StringJoin[#[[2]], StringTake[#[[2]], preLo[#]]]}&, {1, "01"}, n]]]]a267371[13]] (* _Hartmut F. W. Hoft_, Mar 22 2024 *)

%o (Python)

%o from itertools import count, islice

%o def agen(): # generator of terms

%o astr, k, mink = "01", 2, 1

%o while True:

%o yield from map(int, astr[:k])

%o for k in range(1, len(astr)+1):

%o if astr[1:].count(astr[:k]) == 0:

%o break

%o mink = max(mink, k)

%o astr += astr[:k]

%o print(list(islice(agen(), 133))) # _Michael S. Branicky_, Mar 23 2024

%Y Cf. A267372, A267373, A267374.

%K nonn

%O 1

%A _Jeffrey Shallit_, Jan 13 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 14 12:13 EDT 2024. Contains 375164 sequences. (Running on oeis4.)