OFFSET
0,3
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8191
Rémy Sigrist, Colored scatterplot of the first 2^20 terms (where the color is function of min(A000120(n), A080791(n)))
Rémy Sigrist, PARI program for A342102
FORMULA
a(2^k-1) = 2^k-1 for any k >= 0.
a(n) < 2^k for any n < 2^k.
EXAMPLE
-- ---- ------ --------- ------------------------
0 0 0 0 {0}
1 1 1 1 {0, 1}
2 2 10 10 {1}
3 3 11 11 {0, 2}
4 6 100 110 {1, 2}
5 5 101 101 {1, 2}
6 4 110 100 {1, 2}
7 7 111 111 {0, 3}
8 14 1000 1110 {1, 3}
9 12 1001 1100 {2}
10 10 1010 1010 {2}
11 13 1011 1101 {1, 3}
12 9 1100 1001 {2}
13 11 1101 1011 {1, 3}
14 8 1110 1000 {1, 3}
15 15 1111 1111 {0, 4}
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 28 2021
STATUS
approved