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..2187
Rémy Sigrist, PARI program
EXAMPLE
The first terms, alongside the balanced ternary expansion of n * a(n), are:
n a(n) bter(n*a(n))
-- ---- ------------
0 0 0
1 2 1T
2 1 1T
3 6 1T00
4 4 1TT1
5 12 1T1T0
6 3 1T00
7 8 1T01T
8 7 1T01T
9 16 1TT100
10 13 1TTT11
11 14 1T0T01
12 5 1T1T0
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 11 2022
STATUS
approved