Van Eck's sequence is the integer sequence beginning with
in which the next term records the distance to the most recent earlier occurrence
of the current term, or is 0 if the current term has not appeared before (Sloane
2013, p. 231; Numberphile 2019). For
, if
is the largest index with
, set
; if there is no such index, set
. The first terms are 0, 0, 1, 0, 2, 0, 2, 2, 1, 6,
0, 5, 0, 2, 6, 5, 4, ... (OEIS A181391).
The sequence contains infinitely many zeros and is unbounded (Sloane 2013, p. 232). The equivalence follows from the rule: apart from the initial term, a zero is produced exactly when the preceding term appears for the first time.