login
A334941
For any n > 0, let w be the least positive number such that the values (a(n+1-w), ..., a(n-1), e) do not appear continuously in (a(1), ..., a(n-1)) for some e in {0, 1}; a(n) is the least such e.
3
0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0
OFFSET
1
COMMENTS
In other words, at each step we introduce a minimal suffix that has not yet appeared; we first minimize its length, and in case of a tie, we choose the lexicographically earliest.
Will every finite sequence of 0's and 1's appear?
Differs from A079101 for the first time at n = 70. - Jeffrey Shallit, Dec 14 2022
EXAMPLE
For n = 1:
- for w = 1: (0) has not appeared,
- so a(1) = 0.
For n = 2:
- for w = 1: (0) has appeared but (1) has not,
- so a(2) = 1.
For n = 3:
- for w = 1: (0) and (1) have appeared,
- for w = 2: (1, 0) has not appeared,
- so a(3) = 0.
For n = 4:
- for w = 1: (0) and (1) have appeared,
- for w = 2: (0, 0) has not appeared,
- so a(4) = 0.
For n = 5:
- for w = 1: (0) and (1) have appeared,
- for w = 2: (0, 0) and (0, 1) have appeared,
- for w = 3: (0, 0, 0) has not appeared,
- so a(5) = 0.
PROG
(Perl) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, May 17 2020
STATUS
approved