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.

A379381 a(1)=1, a(2)=2; thereafter, a(n) is the smallest positive integer such that for any value k, the number of distinct values between a pair of k's is distinct, counting k itself.

Original entry on oeis.org

1, 2, 1, 2, 3, 3, 4, 2, 4, 5, 5, 6, 4, 6, 7, 2, 6, 7, 8, 7, 8, 9, 9, 10, 6, 8, 10, 11, 10, 11, 12, 2, 11, 12, 13, 8, 13, 14, 11, 12, 13, 14, 15, 14, 15, 16, 16, 17, 2, 13, 15, 17, 18, 8, 15, 18, 19, 17, 19, 20, 17, 18, 20, 21, 20, 21, 22, 22, 23, 18, 21, 23, 24
Offset: 1

Views

Author

Neal Gersh Tolunsky, Dec 21 2024

Keywords

Comments

Note that we are considering every pair of equal values, not just those that appear consecutively.

Examples

			a(7)=4: We cannot have a(7)=1 here because this would make a(1..7) = 1, 2, 1, 2, 3, 3, 1 enclose the same number of terms as a(3..7) = 1, 2, 3, 3, 1 (3 distinct values). We cannot have a(7)=2 because this would mean a(4..7) = 2, 3, 3, 2 encloses 2 values, which we had at a(2..4) = 2, 1, 2. a(7) cannot be 3 because this would repeat a(5-6) = 3, 3 with a(6-7) = 3, 3, again enclosing 1 distinct value. So a(7) = 4 without restriction.
		

Crossrefs