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 A302096 #53 Mar 06 2025 11:01:44 %S A302096 1023456789,1023456798,1023456789,1023457896,1023467895,1023456798, %T A302096 1023456798,1023457896,1023456789,1234567890,1024375869,1023457896, %U A302096 1023456798,1023456798,1023467895,1023457968,1023457698,1023456798,1023458769,1234567980,1023456798,1024375968 %N A302096 a(n) is the smallest pandigital number divisible by n, or 0 if no such pandigital number exists. %C A302096 Note: in this sequence, "pandigital" numbers are defined as in A050278 (i.e., with each of the ten digits 0..9 appearing exactly once). %C A302096 The first 99 terms coincide with those of A061604. - _Giovanni Resta_, May 15 2018 %C A302096 From _Jon E. Schoenfield_, May 19 2018: (Start) %C A302096 Record high values exceeding 2*10^9 begin a(10001) = 2650134987, a(20002) = 2750134986, a(27775) = 3012948675, a(40004) = 3760215984, a(44440) = 4123987560, a(50005) = 6820431975, ... %C A302096 a(n)=0 for every n divisible by 100. Other than multiples of 100, the smallest values of n for which a(n)=0 are 37037 and 55550. The last nonzero term is a(9876543210) = 9876543210. (End) %C A302096 There are 44021407 nonzero terms. - _Michael S. Branicky_, Mar 05 2025 %H A302096 Michael S. Branicky, <a href="/A302096/b302096.txt">Table of n, a(n) for n = 1..10000</a> %H A302096 Michael S. Branicky, <a href="/A302096/a302096.py.txt">Python program for OEIS A302096</a> %H A302096 Rodolfo Kurchan, Mis Acertijos, <a href="http://misacertijos.blogspot.com/2010/11/2004-pandigital-y-primo.html?m=1">2004 Pandigital y primo</a> (in Spanish). %H A302096 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_259.htm">Puzzle 259</a> %e A302096 a(11) = 1024375869 = 11 * 93125079 because it is the smallest pandigital number that is divisible by 11; %e A302096 a(100) = 0 because there is no pandigital number that is divisible by 100. %t A302096 s = Select[FromDigits /@ Permutations[Range[0, 9]], # > 10^9 &]; Table[ SelectFirst[ s, Mod[#, n] == 0 &, 0], {n, 22}] (* _Giovanni Resta_, May 15 2018 *) %o A302096 (Python) # see link for another program %o A302096 from itertools import permutations %o A302096 def a(n): return next((t for p in permutations("0123456789") if p[0] != "0" and (t:=int("".join(p)))%n == 0), 0) %o A302096 print([a(n) for n in range(1, 23)]) # _Michael S. Branicky_, Mar 05 2025 %Y A302096 Cf. A050278, A061604, A171102. %K A302096 nonn,base,fini %O A302096 1,1 %A A302096 _Rodolfo Kurchan_, May 06 2018