OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 (full sequence)
Eric Weisstein's World of Mathematics, Lexicographic Order
Eric Weisstein's World of Mathematics, Ternary
Wikipedia, Lexicographical order
Wikipedia, Ternary numeral system
EXAMPLE
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.
PROG
(Haskell)
import Data.Ord (comparing)
import Data.List (sortBy)
a190128 n = a190128_list !! (n-1)
a190128_list = sortBy (comparing (show . a007089)) [1..10000]
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Reinhard Zumkeller, May 06 2011
STATUS
approved