cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382911 Lexicographically earliest sequence of positive integers such that the n-th pair of consecutive equal values are separated by a(n) distinct terms, with pairs numbered according to the average index of the pair.

This page as a plain text file.
%I A382911 #12 Apr 23 2025 10:37:12
%S A382911 1,2,1,3,1,2,4,2,3,4,2,5,1
%N A382911 Lexicographically earliest sequence of positive integers such that the n-th pair of consecutive equal values are separated by a(n) distinct terms, with pairs numbered according to the average index of the pair.
%C A382911 If two pairs have the same midpoint, the pair enclosing a longer subsequence is considered first (in other words, the pair with the earlier first term and later second term).
%C A382911 Calculating terms may require backtracking, since pair numbers are not fixed until enough later terms either do or don't pair with earlier terms.
%e A382911 The 1st pair (1,2,1) has average index 2 and encloses a(1) = 1 terms.
%e A382911 The 2nd pair (2,1,3,1,2) has average index 4 and encloses a(2) = 2 distinct terms.
%e A382911 The 4th pair (3,1,2,4,2,3) has average index 6.5 and encloses a(4) = 3 distinct terms.
%e A382911 The 5th pair (2,4,2) has average index 7 and encloses a(5) = 1 term.
%e A382911 Notice how the 2nd term of the 5th pair a(8) = 2 occurs earlier than the 2nd term of the 4th pair a(9) = 3. Because the average index (or center of the subsequence) is earlier in the case of the pair enclosing a(4) = 3 terms, we consider it earlier than the pair enclosing a(5) = 1 terms. If after setting a(8) = 2 enclosing a(5) = 1 terms we had not been able to find a value to create a pair with an earlier average index to enclose a(4) = 3 distinct values, it would be necessary to backtrack to a(8) = 2 and try a different candidate.
%Y A382911 Cf. A382908, A363757, A363708, A363654.
%K A382911 nonn,more
%O A382911 1,2
%A A382911 _Neal Gersh Tolunsky_, Apr 08 2025