OFFSET
0,3
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers with infinitely many fixed points (for example, all terms of A000225 are fixed points).
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 A005811(n))
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
1 1 1 1
2 2 10 10
3 3 11 11
4 6 100 110
5 5 101 101
6 4 110 100
7 7 111 111
8 14 1000 1110
9 13 1001 1101
10 10 1010 1010
11 11 1011 1011
12 12 1100 1100
13 9 1101 1001
14 8 1110 1000
15 15 1111 1111
PROG
(PARI) \\ See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 24 2024
STATUS
approved