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.

A190128 Numbers 1 through 10000 sorted lexicographically in ternary representation.

Original entry on oeis.org

1, 3, 9, 27, 81, 243, 729, 2187, 6561, 6562, 6563, 2188, 6564, 6565, 6566, 2189, 6567, 6568, 6569, 730, 2190, 6570, 6571, 6572, 2191, 6573, 6574, 6575, 2192, 6576, 6577, 6578, 731, 2193, 6579, 6580, 6581, 2194, 6582, 6583, 6584, 2195, 6585, 6586, 6587, 244
Offset: 1

Views

Author

Reinhard Zumkeller, May 06 2011

Keywords

Comments

A190129 = inverse permutation: a(A190129(n)) = A190129(a(n)) = n;
a(n) <> n for n > 1.

Examples

			a(12) = 2188 -> 10000001  [tern];
a(13) = 6564 -> 100000010 [tern];
a(14) = 6565 -> 100000011 [tern];
a(15) = 6566 -> 100000012 [tern];
a(16) = 2189 -> 10000002  [tern];
a(17) = 6567 -> 100000020 [tern];
a(18) = 6568 -> 100000021 [tern];
a(19) = 6569 -> 100000022 [tern];
a(20) =  730 -> 1000001   [tern];
a(21) = 2190 -> 10000010  [tern];
largest term a(5164) = 10000 -> 111201101 [tern];
last term a(10000) = 6560 -> 22222222 [tern], largest term lexicographically.
		

Crossrefs

Cf. A007089; A190126 (base 2), A190130 (base 8), A190016 (base 10), A190132 (base 12), A190134 (base 16).

Programs

  • Haskell
    import Data.Ord (comparing)
    import Data.List (sortBy)
    a190128 n = a190128_list !! (n-1)
    a190128_list = sortBy (comparing (show . a007089)) [1..10000]