OFFSET
1,2
COMMENTS
First differences of A267372.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
Starting with 01, we append the shortest prefix occurring only once to get 010. This is of length 1. Next, we append the shortest prefix occurring only once (01) to get 01001. This is of length 2, and so forth.
MATHEMATICA
(* Function preLo[] is defined in A267371 *)
a267373[n_] := Map[First, Rest[NestList[{preLo[#], StringJoin[#[[2]], StringTake[#[[2]], preLo[#]]]}&, {1, "01"}, n]]]
a267373[69] (* 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:
for k in range(mink, len(astr)+1):
if astr[1:].count(astr[:k]) == 0:
break
mink = max(mink, k)
astr += astr[:k]
yield k
print(list(islice(agen(), 69))) # Michael S. Branicky, Mar 23 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeffrey Shallit, Jan 13 2016
STATUS
approved