OFFSET
3,1
LINKS
Jarosław Grytczuk, Hubert Kordulewski, and Bartłomiej Pawlik, Square-free extensions of words, arXiv:2104.04841 [math.CO], 2021. See Table 2 p. 9.
PROG
(Python)
def isf(w): # incrementally squarefree (check factors ending in last letter)
for l in range(1, len(w)//2 + 1):
if w[-2*l:-l] == w[-l:]: return False
return True
def ae(w, sfsnew): # number of internal square free extensions of w
return len(set(x for x in (w[:i]+c+w[i:] for c in "123" for i in range(1, len(w))) if x in sfsnew))
def aupton(nn):
alst, sfs = [], set("123")
for n in range(1, nn+1):
sfsnew = set(w+c for w in sfs for c in "123" if isf(w+c))
if n >= 3: alst.append(max(ae(w, sfsnew) for w in sfs))
sfs = sfsnew
return alst
print(aupton(30)) # Michael S. Branicky, Aug 31 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Michel Marcus, Apr 15 2021
EXTENSIONS
a(51)-a(59) from Michael S. Branicky, Aug 31 2021
STATUS
approved