login
A379692
a(1) = 1; a(n) is the most recently occurring value not among the last k terms where k is the number of times a(n-1) has occurred; if no such value exists, a(n) is the smallest unused positive integer.
1
1, 2, 1, 3, 1, 2, 3, 1, 4, 1, 5, 1, 2, 4, 1, 3, 2, 5, 3, 1, 6, 1, 7, 1, 4, 6, 1, 8, 1, 2, 4, 6, 1, 3, 8, 1, 5, 3, 6, 8, 5, 1, 7, 5, 6, 8, 1, 4, 7, 8, 6, 5, 3, 2, 4, 7, 5, 8, 6, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 3, 15, 1, 4
OFFSET
1,2
COMMENTS
The number preceding and following each first occurrence is the same (with the exception of a(1)=1 which has no predecessor).
LINKS
Neal Gersh Tolunsky, Graph of 100000 terms
Neal Gersh Tolunsky, Graph of 400000 terms
EXAMPLE
To find a(14)=4, we see that a(13) = 2 has occurred 3 times in the sequence, so the most recently occurring value before (5, 1, 2) which is not equal to 5,1,2 is a(9) = 4, so a(14) = 4.
CROSSREFS
Cf. A358921.
Sequence in context: A132662 A279782 A358921 * A390101 A132589 A054843
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Dec 29 2024
STATUS
approved