login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A321464 Reverse nonzero digits in ternary expansion of n and convert back to decimal. 7
0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 19, 12, 13, 22, 21, 16, 25, 18, 11, 20, 15, 14, 23, 24, 17, 26, 27, 28, 55, 30, 31, 58, 57, 34, 61, 36, 37, 64, 39, 40, 67, 66, 49, 76, 63, 46, 73, 48, 43, 70, 75, 52, 79, 54, 29, 56, 33, 32, 59, 60, 35, 62, 45, 38, 65, 42, 41 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

This sequence is a self-inverse permutation of nonnegative integers with fixed points A321473.

See A321474 for the decimal variant.

The binary variant simply corresponds to the identity (A001477).

LINKS

Rémy Sigrist, Table of n, a(n) for n = 0..19683

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(3 * n) = 3 * a(n).

EXAMPLE

The first values at prime indices, alongside the corresponding ternary expansions, are:

  n   a(n)  ter(n)  ter(a(n))

  --  ----  ------  ---------

   2     2       2          2

   3     3      10         10

   5     7      12         21

   7     5      21         12

  11    19     102        201

  13    13     111        111

  17    25     122        221

  19    11     201        102

  23    23     212        212

  29    55    1002       2001

  31    31    1011       1011

  37    37    1101       1101

  41    67    1112       2111

  43    49    1121       1211

PROG

(PARI) a(n, base=3) = my (d=digits(n, base), t=Vecrev(select(sign, d)), i=0); for (j=1, #d, if (d[j], d[j] = t[i++])); fromdigits(d, base)

CROSSREFS

Cf. A001477, A004488, A030102, A321473, A321474.

Sequence in context: A266643 A321525 A321524 * A263273 A264966 A308728

Adjacent sequences:  A321461 A321462 A321463 * A321465 A321466 A321467

KEYWORD

nonn,base

AUTHOR

Rémy Sigrist, Nov 10 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 24 03:51 EDT 2019. Contains 326260 sequences. (Running on oeis4.)