OFFSET
0,7
COMMENTS
The construction described here gives a variant f of Van Eck's sequence with domain Z, and a(n) = f(A001057(n)).
When a value v has already appeared before, then the next value is the least distance to a similar value, otherwise the next value is 0.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, Scatterplot of (A001057(n), a(n)) for n <= 1000000
Rémy Sigrist, PARI program
EXAMPLE
The first steps of the construction are as follows:
n a(n) Values so far (including (a(n))
-- ---- -------------------------------
0 0 0
1 0 0 0
2 1 1 0 0
3 0 1 0 0 0
4 1 1 1 0 0 0
5 1 1 1 0 0 0 1
6 4 4 1 1 0 0 0 1
7 0 4 1 1 0 0 0 1 0
8 2 2 4 1 1 0 0 0 1 0
9 0 2 4 1 1 0 0 0 1 0 0
10 1 1 2 4 1 1 0 0 0 1 0 0
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Mar 27 2022
STATUS
approved