login
A369320
Lexicographically earliest sequence such that each set of numbers enclosed by a pair of consecutive, equal terms, excluding the endpoints, is distinct.
3
1, 1, 2, 1, 2, 3, 1, 2, 3, 2, 4, 1, 2, 3, 4, 2, 3, 5, 1, 2, 3, 4, 3, 5, 2, 3, 4, 6, 1, 2, 3, 4, 5, 3, 4, 6, 2, 3, 4, 5, 4, 7, 1, 2, 3, 4, 5, 6, 3, 4, 5, 7, 2, 3, 4, 5, 6, 4, 5, 8, 1, 2, 3, 4, 5, 6, 5, 7, 3, 4, 5, 6, 8, 2, 3, 4, 5, 6, 7, 4, 5, 6, 9, 1, 2, 3, 4
OFFSET
1,3
COMMENTS
The word 'set' means that every element is unique and order is irrelevant. {2,3}, for example, is equivalent to {3,2,2} and thus both could never appear in the sequence.
The pair of equal values a(n)=a(n+1) encloses the empty set {}, and thus after [a(1), a(2)] = [1, 1] no two equal values will occur one after the other.
A new value is always followed by 1.
LINKS
Rémy Sigrist, PARI program
EXAMPLE
a(2)=1, establishing the empty set, [1,1] -> {}.
a(4)=1, creating the set [1,2,1] -> {2}, which is distinct from any set enclosed by consecutive equal values that has appeared thus far.
a(8)=2. a(8) cannot be 1 since this would again create the empty set enclosed already by [a(1), a(2)] = [1, 1]. 2 creates the set [2,3,1,2] = {1,3} which is distinct from any other set thus far.
PROG
(PARI) See Links section.
CROSSREFS
Cf. A366631.
Sequence in context: A280055 A253092 A194546 * A115452 A039676 A242359
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Jan 19 2024
EXTENSIONS
More terms from Rémy Sigrist, Jan 20 2024
STATUS
approved