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.

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.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Dec 29 2024

Keywords

Comments

The number preceding and following each first occurrence is the same (with the exception of a(1)=1 which has no predecessor).

Examples

			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.