OFFSET
1,5
COMMENTS
Unlike Van Eck's sequence, it is plausible that the sequence contains a finite number of zeros, since a zero occurs only after an a(n) with a value that has occurred exactly once, and when there are no other values that have occurred one time. Zeros being finite (or infinite) would require a proof.
EXAMPLE
Before a(9), the sequence so far is 0,0,1,0,2,2,1,1. We look at the number of times the value 1 at a(8) has appeared, which is 3 times. The last number to appear 3 times (which is distinct from our value 1) is 0, so we jump back 4 terms to reach a(4)=0. a(9) is therefore 4. Continuing the sequence, we see that 4 has occurred one time thus far and no other values have occurred just once, so a(10) is automatically set to 0. To find a(11), we see that a(n)=0 has occurred 4 times. Since no other distinct terms have appeared in the sequence 4 times, we go back to the nearest 0, which happened 6 terms ago, so a(11) is 6. To summarize, there is an order of preferences in these three examples: If a(n) occurs k times, then we go back to the last different value where a(m) occurs k times. If a(n) is the only value to occur k times, we go back to the most recent a(m) with that value (besides a(n) itself). If a(n) is the only value to occur only once a(n+1)=0.
CROSSREFS
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Sep 28 2022
STATUS
approved