OFFSET
1,2
COMMENTS
Leading zeros are ignored.
This sequence is a self-inverse permutation of the natural numbers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..8192
Rémy Sigrist, Colored scatterplot of the first 2^13 terms (where the color is function of the Hamming weight of n)
Rémy Sigrist, PARI program for A331274
EXAMPLE
The first terms, in decimal and in binary, are:
n a(n) bin(n) bin(a(n))
-- ---- ------ ---------
1 1 1 1
2 2 10 10
3 3 11 11
4 4 100 100
5 6 101 110
6 5 110 101
7 7 111 111
8 8 1000 1000
9 12 1001 1100
10 10 1010 1010
11 14 1011 1110
12 9 1100 1001
13 13 1101 1101
14 11 1110 1011
15 15 1111 1111
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Jan 13 2020
STATUS
approved