login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A350708
A variant of Van Eck's sequence where we start with the value 0, and then alternatively add values to the right and to the left; the sequence lists the values as they are added.
1
0, 0, 1, 0, 1, 1, 4, 0, 2, 0, 1, 3, 0, 6, 0, 1, 5, 0, 4, 6, 3, 16, 0, 4, 15, 0, 4, 4, 2, 10, 0, 4, 2, 2, 21, 0, 5, 10, 4, 6, 10, 35, 0, 6, 2, 6, 1, 18, 0, 3, 19, 0, 8, 0, 1, 4, 12, 0, 2, 7, 0, 6, 8, 5, 40, 0, 4, 14, 0, 4, 7, 65, 0, 2, 20, 0, 5, 20, 76, 0, 2
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.
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
Sequence in context: A136452 A247703 A280639 * A319037 A067565 A243154
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Mar 27 2022
STATUS
approved