login
A355642
Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, the balanced ternary expansion of n * a(n) contains as many negative trits as positive trits.
1
0, 2, 1, 6, 4, 12, 3, 8, 7, 16, 13, 14, 5, 10, 11, 26, 9, 24, 23, 28, 20, 22, 21, 18, 17, 32, 15, 46, 19, 30, 29, 40, 25, 42, 34, 48, 36, 38, 37, 44, 31, 52, 33, 54, 39, 58, 27, 74, 35, 56, 55, 68, 41, 70, 43, 50, 49, 64, 45, 66, 60, 72, 63, 62, 57, 76, 59, 80
OFFSET
0,2
COMMENTS
This sequence is a self-inverse permutation of the nonnegative integers.
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
See A306993 for a similar sequence.
Sequence in context: A257134 A121403 A155550 * A268754 A357639 A005299
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 11 2022
STATUS
approved