|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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?
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|