OFFSET
1,4
COMMENTS
The point is that the same k(n) must be used for both a(2*n) and a(2*n+1). - N. J. A. Sloane, Dec 17 2019
Apparently every signed integer appears in the sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = (a(2*n) + a(2*n+1))/2.
EXAMPLE
The first terms, alongside k(n) and associate children, are:
n a(n) k(n) a(2*n) a(2*n+1)
-- ---- ---- ------ --------
1 0 1 1 -1
2 1 3 4 -2
3 -1 3 2 -4
4 4 1 5 3
5 -2 8 6 -10
6 2 5 7 -3
7 -4 12 8 -16
8 5 10 15 -5
9 3 9 12 -6
10 6 13 19 -7
PROG
(PARI) lista(nn) = my (a=[0], s=Set(0)); for (n=1, ceil(nn/2), for (k=1, oo, if (!setsearch(s, a[n]+k) && !setsearch(s, a[n]-k), a=concat(a, [a[n]+k, a[n]-k]); s=setunion(s, Set([a[n]+k, a[n]-k])); break))); a[1..nn]
CROSSREFS
KEYWORD
sign,look
AUTHOR
Rémy Sigrist, Dec 13 2018
STATUS
approved