login
Primes less than 100000 sorted lexicographically in decimal representation.
6

%I #19 Jul 18 2020 11:41:11

%S 10007,10009,10037,10039,10061,10067,10069,10079,1009,10091,10093,

%T 10099,101,10103,10111,1013,10133,10139,10141,10151,10159,10163,10169,

%U 10177,10181,1019,10193,1021,10211,10223,10243,10247,10253,10259,10267,10271,10273,10289

%N Primes less than 100000 sorted lexicographically in decimal representation.

%C The sequence is finite with 9592 terms, A006880(5) = 9592.

%H Reinhard Zumkeller, <a href="/A210760/b210760.txt">Table of n, a(n) for n = 1..9592</a> all terms

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LexicographicOrder.html">Lexicographic Order</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Lexicographical_order">Lexicographical order</a>

%e a(1194) = 2; a(2323) = 3; a(4489) = 5; a(6557) = 7;

%e a(1) = A000040(1230) = 10007, first term;

%e a(9592) = A000040(9592) = 99991, last term.

%o (Haskell)

%o import Data.List (sortBy)

%o import Data.Function (on)

%o a210760 n = a210760_list !! (n-1)

%o a210760_list = sortBy (compare `on` show) $

%o takeWhile (<= 10^5) a000040_list

%o -- _Reinhard Zumkeller_, Apr 01 2012, Mar 25 2012

%Y Cf. A000040, A210757, A210758, A210759, A210761.

%K nonn,base,fini,full

%O 1,1

%A _Reinhard Zumkeller_, Mar 25 2012