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.

A343887 a(1) = 1. Thereafter if a(n) is a novel term, a(n+1) = number of prior terms > a(n). If a(n) has been seen already, a(n+1) = a(n) + smallest prior term (which, once used, cannot be used again).

Original entry on oeis.org

1, 0, 1, 1, 2, 0, 1, 1, 2, 3, 0, 1, 1, 2, 3, 5, 0, 2, 2, 4, 1, 3, 4, 6, 0, 3, 3, 6, 9, 0, 3, 3, 6, 9, 12, 0, 4, 4, 8, 3, 7, 4, 7, 11, 1, 5, 6, 11, 16, 0, 6, 6, 12, 18, 0, 6, 6, 12, 18, 24, 0, 6, 6, 12, 18, 25, 0, 7, 7, 14, 6, 13, 7, 13, 20, 2, 10, 16, 18, 27, 0
Offset: 1

Views

Author

David James Sycamore, May 02 2021

Keywords

Comments

The sequence is nontrivial if and only if a(1) > 0. a(n) <= n for n <= 10000, but it is not known if this holds for all n. a(n) + a(n+1) <= n is usually but not always true (first exception is at n=509; a(509) + a(510) = 248 + 311 = 559).
For n > 1, a(n) = 0 if and only if a(n-1) is a record novel term, whereas every non-record novel term is followed by a nonzero term. Let S(n) be the set of unused terms prior to a(n), then step function |S(n)| increments +1 at a(k+1), where a(k) is a novel term. S(n) typically contains multiple copies of each unused number, providing a continuously incremented supply of least prior terms to add to repeat leading terms as the sequence extends. This suggests that there is always a next record, and hence that zero occurs infinitely many times. Indices of records: 1, 5, 10, 16, 24, 29, 35, 49, 54, 60, 66, 80, 86, 114, 136, 166, 176, 192, 198, 231, ...
If a(k) is a record term, we see a(k), 0, m, m, ... where m is the least member of S(k). Between any consecutive pair of zeros we see either no novel terms, in which case the trajectory climbs quickly to the next record term, or there are novel terms, each of which disturbs and extends the trajectory to the next record (see plots).

Examples

			a(2)=0 since a(1)=1 is a novel term and there are zero terms prior to a(1) which are greater than 1. a(3)=1 since a(2)=0 is a novel term and there is one prior term (a(1)=1) which is > 0. a(4)=1+0=1 because a(3) is a repeat term and the smallest unused prior term is 0.
		

Crossrefs

Programs