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.
%I A093018 #18 Jul 23 2024 18:06:23 %S A093018 0,18,26,34,42,59,67,75,83,91,109,117,125,133,141,158,166,174,182,190, %T A093018 208,216,224,232,240,257,265,273,281,299,307,315,323,331,349,356,364, %U A093018 372,380,398,406,414,422,430,448,455,463,471,489,497,505,513,521,539 %N A093018 Natural numbers with appended Luhn mod 10 check digit. %C A093018 Indices of terms in A093017 == 0 mod 10. %C A093018 A249832(a(n)) = 1; A093017(a(n)) mod 10 = 0; a(n) = 10*n + A093019(n); A093019(n) = a(n) mod 10. - _Reinhard Zumkeller_, Nov 08 2014 %C A093018 The sequence includes all Canadian Social Insurance Numbers, as well as all modern credit and debit card numbers. - _Mathew Englander_, Aug 04 2021 %H A093018 Reinhard Zumkeller, <a href="/A093018/b093018.txt">Table of n, a(n) for n = 0..10000</a> %H A093018 John Kilgo, DotNetJohn.com, <a href="http://www.dotnetjohn.com/articles/articleid97.aspx">Using the Luhn Algorithm</a> %H A093018 Webopedia, <a href="http://www.webopedia.com/TERM/L/Luhn_formula.html">Luhn formula</a> %H A093018 Wikipedia, <a href="http://en.wikipedia.org/wiki/Luhn_algorithm">Luhn algorithm</a> %H A093018 <a href="/index/De#decimal_expansion">Index entries for sequences related to decimal expansion of n</a> %e A093018 18 is in the sequence because A093017(18)=10 == 0 mod 10. %e A093018 59 is in the sequence because A093017(59)=10 == 0 mod 10. %o A093018 (Haskell) %o A093018 a093018 n = a093018_list !! n %o A093018 a093018_list = filter ((== 1) . a249832) [0..] %o A093018 -- _Reinhard Zumkeller_, Nov 08 2014 %o A093018 (Python) %o A093018 def a(n): %o A093018 s = str(n) %o A093018 r = s[::-1] %o A093018 x = sum(int(d) for d in r[1::2]) %o A093018 x += sum(q if (q:=2*int(d)) < 10 else q-9 for d in r[::2]) %o A093018 x = x%10 %o A093018 c = str((10 - x) if x > 0 else 0) %o A093018 return int(s+c) %o A093018 print([a(n) for n in range(54)]) # _Michael S. Branicky_, Jul 23 2024 %Y A093018 Cf. A093017-A093029. %Y A093018 Cf. A249832, A093017, A249830 (complement), A249854, A249855, A010879. %K A093018 easy,nonn,base %O A093018 0,2 %A A093018 _Ray Chandler_, Apr 03 2004 %E A093018 Original name end comment interchanged by _Reinhard Zumkeller_, Nov 08 2014