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.
%I A379381 #16 Jan 02 2025 11:55:08 %S A379381 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, %T A379381 2,11,12,13,8,13,14,11,12,13,14,15,14,15,16,16,17,2,13,15,17,18,8,15, %U A379381 18,19,17,19,20,17,18,20,21,20,21,22,22,23,18,21,23,24 %N 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. %C A379381 Note that we are considering every pair of equal values, not just those that appear consecutively. %H A379381 Neal Gersh Tolunsky, <a href="/A379381/b379381.txt">Table of n, a(n) for n = 1..10000</a> %e A379381 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. %Y A379381 Cf. A330896, A366691, A370577, A281511. %K A379381 nonn %O A379381 1,2 %A A379381 _Neal Gersh Tolunsky_, Dec 21 2024