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

%I #8 Oct 10 2019 09:58:27

%S 0,100008,100016,100024,100032,100040,100057,100065,100073,100081,

%T 10009,100099,100107,100115,100123,100131,100149,100156,100164,10017,

%U 100172,100180,100198,100206,100214,100222,100230,100248,10025,100255,100263,100271,100289

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

%H Reinhard Zumkeller, <a href="/A249854/b249854.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 a249854 n = a249854_list !! (n-1)

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

%o takeWhile (<= 10^6) a093018_list

%Y Cf. A093018, A249855.

%K nonn,base,fini,full

%O 1,2

%A _Reinhard Zumkeller_, Nov 08 2014