OFFSET
0,1
COMMENTS
With V=A181391, a(n) is the smallest number m such that V(m) = V(m-1) = n.
Since van Eck's sequence is generated by considering the gap between identical terms reappearing, it is of interest to consider terms of value n which repeat with a gap of length n.
When this happens the term is repeated in succession.
Some observations that follow from the definition of V:
V(a(n)-1-n) = n. The value n has to appear exactly n terms apart in V to make the following term equal to n, e.g., for n=3: "..., 3, 8, 0, 3, 3, ...".
V(a(n)+1) = 1. Since the term n appeared twice in a row, the following term of V must be 1.
V(a(n)-2) = V(a(n)-n-2) = V(a(n)-2*n-2). The number preceding the repeated terms appears three times with gaps of n.
V(a(n)+2) = the number of terms since the previous repeated value of some number (though it may not be the first time it is repeated). So V(a(n)-V(a(n)+2)) = V(a(n)-V(a(n)+2)-1).
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..999
Rémy Sigrist, C++ program for A308782
EXAMPLE
With V=A181391 and n=8:
V(95) = V(96) = 8. Therefore, a(8) = 96.
---
V(a(n)-1-n) = n:
a(8) - 1 - 8 = 87.
V(87) = 8.
---
V(a(n)+1) = 1:
a(8) + 1 = 97.
V(97) = 1.
---
V(a(n)-2) = V(a(n)-n-2) = V(a(n)-2*n-2):
a(8) - 2 = 94.
a(8) - 8 - 2 = 86.
a(8) - 2*8 - 2 = 78.
V(94) = V(86) = V(78) = 3.
---
V(a(8)+2) = 46. a(8) - 46 = 50. The previous repeated terms in V are V(50) = V(49) = 5.
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Deron Stewart, Jun 24 2019
STATUS
approved