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..6560
Rémy Sigrist, PARI program
FORMULA
EXAMPLE
The first terms, in decimal and in base 3, are:
n a(n) ter(n) ter(a(n))
-- ---- ------ ---------
0 0 0 0
1 2 1 2
2 1 2 1
3 7 10 21
4 8 11 22
5 6 12 20
6 5 20 12
7 3 21 10
8 4 22 11
9 22 100 211
10 23 101 212
11 21 102 210
12 25 110 221
13 26 111 222
14 24 112 220
15 20 120 202
PROG
(PARI) \\ See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 16 2024
STATUS
approved