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

 

Logo
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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
LINKS
EXAMPLE
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.
MATHEMATICA
preLo[{np_, s_}] := NestWhile[#+1&, np, StringCount[s, StringTake[s , #], Overlaps->True]>1&]
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 *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
astr, k, mink = "01", 2, 1
while True:
yield from map(int, astr[:k])
for k in range(1, len(astr)+1):
if astr[1:].count(astr[:k]) == 0:
break
mink = max(mink, k)
astr += astr[:k]
print(list(islice(agen(), 133))) # Michael S. Branicky, Mar 23 2024
CROSSREFS
Sequence in context: A270742 A164349 A094186 * A285205 A286654 A003849
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jan 13 2016
STATUS
approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 12:52 EDT 2024. Contains 371711 sequences. (Running on oeis4.)