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.

A383421 a(1)=1; thereafter if a(n-1) is a first occurrence, then a(n) is the number of values that occur exactly once in the sequence thus far. Otherwise; a(n) is the number of terms that are the same distance away from an earlier equal value as a(n-1) is from its previous last occurrence.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 3, 6, 2, 5, 4, 6, 7, 1, 2, 2, 3, 2, 4, 3, 6, 5, 2, 5, 5, 4, 9, 2, 6, 5, 7, 3, 4, 10, 2, 11, 3, 8, 4, 4, 5, 5, 6, 9, 10, 6, 8, 6, 6, 7, 7, 8, 10, 7, 10, 7, 8, 12, 2, 3, 5, 10, 13, 3, 9, 8, 8, 9, 11, 5, 9, 12, 12
Offset: 1

Views

Author

Neal Gersh Tolunsky, Apr 26 2025

Keywords

Examples

			a(18) = 3: a(17) = 1 has a distance of 5 from its previous last occurrence a(12) = 1. There are a total of 3 terms with a distance of 5 from an earlier equal term; they occur at indices i = 8,9,17. So a(18) = 3.
		

Crossrefs