login
A383340
a(1)=1; thereafter if a(n-1) is a first occurrence, then a(n) is the number of first occurrences in the sequence thus far. Otherwise, a(n) is the number of terms that are the same number of distinct values away from their previous last occurrence as a(n-1).
3
1, 1, 1, 2, 1, 1, 3, 2, 1, 2, 2, 4, 2, 3, 1, 2, 3, 4, 3, 4, 5, 1, 1, 5, 6, 1, 5, 6, 7, 1, 4, 2, 1, 8, 2, 9, 3, 1, 3, 7, 2, 4, 3, 5, 2, 6, 3, 7, 1, 4, 5, 6, 2, 7, 3, 8, 4, 9, 5, 1, 6, 7, 2, 8, 3, 9, 4, 10, 1, 11, 2, 5, 1, 8, 12, 3, 1, 9, 2, 10, 13, 3, 4, 2, 5, 3
OFFSET
1,4
LINKS
EXAMPLE
a(17) = 3: a(16) = 2 is separated by 2 distinct values from its previous last occurrence. There are 3 terms in total separated by two distinct values from their previous last occurrence; they are at indices i = 8,9,16. So a(17) = 3.
CROSSREFS
Cf. A383339.
Sequence in context: A125106 A229874 A364673 * A330439 A243611 A273102
KEYWORD
nonn,look
AUTHOR
Neal Gersh Tolunsky, Apr 23 2025
STATUS
approved