OFFSET
0,2
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..16383
Rémy Sigrist, Scatterplot of the terms < 2^20
Rémy Sigrist, PARI program
EXAMPLE
The first terms, in decimal and in binary, are:
n a(n) bin(n) bin(a(n))
-- ---- ------ ---------
0 0 0 0
1 3 1 11
2 2 10 10
3 1 11 1
4 13 100 1101
5 15 101 1111
6 12 110 1100
7 14 111 1110
8 9 1000 1001
9 8 1001 1000
10 11 1010 1011
11 10 1011 1010
12 6 1100 110
13 4 1101 100
14 7 1110 111
15 5 1111 101
16 53 10000 110101
PROG
(PARI) \\ See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 24 2024
STATUS
approved