login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A331275
a(n) is the greatest ternary anagram of n not yet in the sequence.
4
1, 2, 3, 4, 7, 6, 5, 8, 9, 12, 21, 10, 13, 22, 19, 16, 25, 18, 15, 24, 11, 14, 23, 20, 17, 26, 27, 36, 63, 30, 39, 66, 57, 64, 75, 28, 37, 58, 31, 40, 67, 48, 49, 76, 55, 46, 73, 42, 43, 70, 69, 68, 79, 54, 45, 72, 33, 38, 65, 60, 61, 78, 29, 34, 59, 32, 41
OFFSET
1,2
COMMENTS
Leading zeros are ignored.
This sequence is a self-inverse permutation of the natural numbers.
EXAMPLE
The first terms, in decimal and in ternary, are:
n a(n) ter(n) ter(a(n))
-- ---- ------ ---------
1 1 1 1
2 2 2 2
3 3 10 10
4 4 11 11
5 7 12 21
6 6 20 20
7 5 21 12
8 8 22 22
9 9 100 100
10 12 101 110
11 21 102 210
12 10 110 101
13 13 111 111
14 22 112 211
15 19 120 201
PROG
(PARI) See Links section.
CROSSREFS
Cf. A331274 (binary analog).
Sequence in context: A092842 A343600 A343601 * A072028 A269377 A072026
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jan 13 2020
STATUS
approved