OFFSET
1,1
COMMENTS
For any n > 0, a(n) is the value of the sibling of the node with value n in the binary tree described in A326936.
This sequence is a self-inverse permutation of the positive integers.
LINKS
EXAMPLE
For n = 1:
- we set L = (1).
For n = 2:
- we set L = (1, 2).
For k = 3:
- the first two terms, (1, 2), sum to 3,
- so a(1) = 2 and a(2) = 1,
- we set L = (3).
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 24 2019
STATUS
approved