login
A302096
a(n) is the smallest pandigital number divisible by n, or 0 if no such pandigital number exists.
1
1023456789, 1023456798, 1023456789, 1023457896, 1023467895, 1023456798, 1023456798, 1023457896, 1023456789, 1234567890, 1024375869, 1023457896, 1023456798, 1023456798, 1023467895, 1023457968, 1023457698, 1023456798, 1023458769, 1234567980, 1023456798, 1024375968
OFFSET
1,1
COMMENTS
Note: in this sequence, "pandigital" numbers are defined as in A050278 (i.e., with each of the ten digits 0..9 appearing exactly once).
The first 99 terms coincide with those of A061604. - Giovanni Resta, May 15 2018
From Jon E. Schoenfield, May 19 2018: (Start)
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, ...
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)
There are 44021407 nonzero terms. - Michael S. Branicky, Mar 05 2025
LINKS
Michael S. Branicky, Python program for OEIS A302096
Rodolfo Kurchan, Mis Acertijos, 2004 Pandigital y primo (in Spanish).
Carlos Rivera, Puzzle 259
EXAMPLE
a(11) = 1024375869 = 11 * 93125079 because it is the smallest pandigital number that is divisible by 11;
a(100) = 0 because there is no pandigital number that is divisible by 100.
MATHEMATICA
s = Select[FromDigits /@ Permutations[Range[0, 9]], # > 10^9 &]; Table[ SelectFirst[ s, Mod[#, n] == 0 &, 0], {n, 22}] (* Giovanni Resta, May 15 2018 *)
PROG
(Python) # see link for another program
from itertools import permutations
def a(n): return next((t for p in permutations("0123456789") if p[0] != "0" and (t:=int("".join(p)))%n == 0), 0)
print([a(n) for n in range(1, 23)]) # Michael S. Branicky, Mar 05 2025
CROSSREFS
KEYWORD
nonn,base,fini,changed
AUTHOR
Rodolfo Kurchan, May 06 2018
STATUS
approved