cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A321767 Reverse runs of nonzero digits in ternary expansion of n and convert back to decimal.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 12, 13, 14, 15, 16, 17, 18, 11, 20, 21, 22, 23, 24, 25, 26, 27, 28, 55, 30, 37, 46, 57, 64, 73, 36, 31, 58, 39, 40, 41, 42, 43, 44, 45, 32, 59, 48, 49, 50, 51, 52, 53, 54, 29, 56, 33, 38, 47, 60, 65, 74, 63, 34, 61, 66, 67
Offset: 0

Views

Author

Rémy Sigrist, Nov 18 2018

Keywords

Comments

This sequence is a self-inverse permutation of nonnegative integers.

Examples

			For n = 11111:
- the ternary representation of 11111 is "120020112",
- we have three runs of nonzero digits: "12", "2" and "112",
- we replace the first by the third, the third by the first and the second remains in place,
- the result is: "112002012",
- and a(11111) = 10265.
		

Crossrefs

See A321726 for a similar sequence.

Programs

  • PARI
    See Links section.

Formula

a(3 * n) = 3 * a(n).
Showing 1-1 of 1 results.