login
Numbers <= 10^6 with valid Luhn mod 10 check digit, sorted first by check digit, then lexicographically.
3

%I #9 Oct 10 2019 09:58:35

%S 0,100040,100180,100230,100370,100420,100560,100610,100750,100800,

%T 10090,100990,101030,101170,101220,101360,10140,101410,101550,101600,

%U 101790,101840,101980,102020,102160,102210,102350,102400,102590,102640,102780,10280,102830

%N Numbers <= 10^6 with valid Luhn mod 10 check digit, sorted first by check digit, then lexicographically.

%H Reinhard Zumkeller, <a href="/A249855/b249855.txt">Table of n, a(n) for n = 1..100000</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Luhn_algorithm">Luhn algorithm</a>

%H <a href="/index/De#decimal_expansion">Index entries for sequences related to decimal expansion of n</a>

%o (Haskell)

%o import Data.List (sortBy); import Data.Function (on)

%o a249855 n = a249855_list !! (n-1)

%o a249855_list = sortBy (compare `on` f) $ takeWhile (<= 10^6) a093018_list

%o where f x = (head $ reverse ds, ds) where ds = show x

%Y Cf. A093018, A249854.

%K nonn,base,fini,full,look

%O 1,2

%A _Reinhard Zumkeller_, Nov 08 2014