login
A082379
Number of length-n 7/3-power-free words over the alphabet {0,1}.
4
1, 2, 4, 6, 10, 14, 20, 24, 30, 40, 48, 56, 64, 76, 82, 92, 106, 124, 142, 152, 172, 192, 210, 220, 234, 256, 284, 308, 314, 332, 356, 372, 392, 420, 456, 488, 524, 560, 588, 608, 640, 684, 736, 764, 796, 832, 874, 892, 912, 948, 994, 1020, 1060, 1112, 1184
OFFSET
0,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..732
Juhani Karhumäki and Jeffrey Shallit, Polynomial versus exponential growth in repetition-free binary words, arXiv:math/0304095 [math.CO], April 7 2003.
Juhani Karhumäki and Jeffrey Shallit, Polynomial versus exponential growth in repetition-free binary words, Journal of Combinatorial Theory, Series A 105 (2004) 335-347.
PROG
(Python)
from fractions import Fraction
from functools import lru_cache
from itertools import count, islice, product
def period(x):
for p in range(1, len(x)):
if all(x[i] == x[i+p] for i in range(len(x)-p)):
return p
return len(x)
def exp(x):
return Fraction(len(x), period(x))
@lru_cache(maxsize=None)
def cexp(x):
if len(x) == 1: return 1
return max(exp(x), cexp(x[:-1]), cexp(x[1:]))
def agen(): # generator of 7/3-power-free terms
yield 1
stfs = set("0")
for n in count(1):
yield 2*len(stfs)
stfsnew = set(s+i for s in stfs for i in "01" if cexp(s+i) < Fraction(7, 3))
stfs = stfsnew
print(list(islice(agen(), 60))) # Michael S. Branicky, Dec 08 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Stephan, Apr 10 2003
EXTENSIONS
Name changed by Jeffrey Shallit, Sep 26 2014
More terms from Jeffrey Shallit, Jul 17 2021
STATUS
approved