A297184
Number of closed binary words of length n that are not privileged.
Original entry on oeis.org
0, 0, 0, 0, 2, 4, 12, 20, 42, 76, 144, 256, 488, 892, 1672, 3092, 5798, 10856, 20512, 38652, 73344, 139212, 265312, 506464, 969552, 1858784, 3571368, 6871692, 13244040, 25558888, 49392068, 95555560, 185075058, 358812020, 696308312, 1352420168, 2628949868
Offset: 0
- G. Badkobeh, G. Fici, Z. Lipták, On the number of closed factors in a word, in A.-H. Dediu et al., eds., LATA 2015, LNCS 8977, 2015, pp. 381-390. Available at arXiv, arXiv:1305.6395 [cs.FL], 2013-2014.
- Gabriele Fici, Open and Closed Words, in Giovanni Pighizzini, ed., The Formal Language Theory Column, Bulletin of EATCS, 2017.
A291365
Number of closed Sturmian words of length n.
Original entry on oeis.org
2, 2, 4, 6, 12, 16, 26, 36, 52, 64, 86, 108, 142, 170, 206, 242, 294, 340, 404, 468, 544, 610, 698, 786, 894, 990, 1104, 1218, 1360, 1494, 1658, 1822, 2006, 2174, 2366, 2558, 2786, 2996, 3230, 3464
Offset: 1
For n = 4, the closed Sturmian words of length n are "aaaa", "abab", "abba", "baab", "baba" and "bbbb".
- Michael S. Branicky, Python program
- Michelangelo Bucci, Alessandro De Luca and Gabriele Fici, Enumeration and structure of trapezoidal words, Theor. Comput. Sci. 468: 12-22 (2013).
- Gabriele Fici, Open and Closed Words, in Giovanni Pighizzini, ed., The Formal Language Theory Column, Bulletin of EATCS, 2017.
- Alessandro De Luca and Gabriele Fici, Open and Closed Words, in Lecture Notes in Computer Science, vol. 8079, pp. 132-142, 2013. Available at arXiv, arXiv:1306.2254 [math.CO], 2013.
- Alessandro De Luca, Gabriele Fici and Luca Q. Zamboni. The sequence of open and closed prefixes of a Sturmian word. Advances in Applied Mathematics Volume 90, September 2017, Pages 27-45. Available at arXiv, arXiv:1701.01580 [cs.DM], 2017.
-
# see link for faster, bit-based version
from itertools import product
def is_strm(w): # w is a finite Sturmian word
for l in range(2, len(w)):
facts = set(w[j:j+l] for j in range(len(w)-l+1))
counts = set(f.count('0') for f in facts)
if max(counts) - min(counts) > 1:
return False
return True
def is_clsd(w): # w is a closed word
if len(set(w)) <= 1: return True
for l in range(1, len(w)):
if w[:l] == w[-l:] and w[:l] not in w[1:-1]:
return True
return False
def is_cs(w): # w is a closed Sturmian word
return is_clsd(w) and is_strm(w)
def a(n):
return 2*sum(is_cs("0"+"".join(b)) for b in product("01", repeat=n-1))
print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Sep 27 2021
A297183
Number of open binary words of length n.
Original entry on oeis.org
0, 0, 2, 4, 10, 20, 44, 92, 194, 396, 820, 1684, 3432, 6972, 14144, 28636, 57890, 116828, 235500, 474304, 954444, 1919364, 3857548, 7748888, 15558988, 31229384, 62662088, 125696800, 252079196, 505423476, 1013189208, 2030729700, 4069562810, 8154257184, 16336840080, 32726819744, 65553540096
Offset: 0
- Gabriele Fici, Open and Closed Words, in Giovanni Pighizzini, ed., The Formal Language Theory Column, Bulletin of EATCS, 2017.
A332983
Number of length-n binary words closed by an unbordered word.
Original entry on oeis.org
0, 2, 2, 4, 6, 12, 18, 34, 54, 100, 170, 310, 542, 1000, 1786, 3292, 5990, 11100, 20434, 38102, 70858, 132912, 249290, 470300, 888158, 1684488, 3199258, 6095502, 11631550, 22249232, 42621834, 81804946, 157221374, 302632804, 583237734, 1125468466, 2174144774
Offset: 1
For n = 5 the a(5) = 6 words counted are 01001, 01101, 01110, and their binary complements.
Showing 1-4 of 4 results.
Comments