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..8192
Rémy Sigrist, Scatterplot of the first 2^18 terms
Rémy Sigrist, PARI program
FORMULA
a(n) >= A370427(n).
EXAMPLE
The first terms, alongside the corresponding binary expansions, are:
n a(n) bin(n) bin(a(n)) bin(n OR a(n))
-- ---- ------ --------- --------------
0 0 0 0 0
1 1 1 1 1
2 3 10 11 11
3 2 11 10 11
4 5 100 101 101
5 4 101 100 101
6 7 110 111 111
7 6 111 110 111
8 9 1000 1001 1001
9 8 1001 1000 1001
10 13 1010 1101 1111
11 12 1011 1100 1111
12 11 1100 1011 1111
13 10 1101 1010 1111
14 15 1110 1111 1111
15 14 1111 1110 1111
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 18 2024
STATUS
approved