login
A318725
a(n) is the smallest number k such that k! is pandigital in base n.
3
2, 8, 5, 11, 17, 14, 15, 23, 23, 24, 36, 30, 35, 46, 50, 43, 50, 40, 59, 62, 54, 69, 75, 70, 65, 79, 83, 68, 97, 99, 86, 89, 93, 97, 118, 94, 106, 126, 128, 116, 145, 127, 134, 151, 143, 124, 141, 124, 141, 170, 194, 169, 190, 183, 181, 180, 195, 195, 210, 163
OFFSET
2,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 2..1348 (terms 2..1000 from Seiichi Manyama)
EXAMPLE
a(2) = 2! = 2_10 = 10_2;
a(3) = 8! = 40320_10 = 2001022100_3;
a(4) = 5! = 120_10 = 1320_4.
a(5) = 11! = 39916800_10 = 4020431420_5;
a(6) = 17! = 355687428096000_10 = 3300252314304000000_6.
PROG
(PARI) a(n) = {my(k=1); while (#Set(digits(k!, n)) != n, k++); k; } \\ Michel Marcus, Sep 02 2018
(Python)
from itertools import count
from sympy.ntheory import digits
def A318725(n):
c, flag = 1, False
for k in count(1):
m = k
if flag:
a, b = divmod(m, n)
while not b:
m = a
a, b = divmod(m, n)
c *= m
if len(set(digits(c, n)[1:]))==n:
return k
if not (flag or c%n):
flag = True # Chai Wah Wu, Mar 13 2024
CROSSREFS
Cf. A049363 (smallest pandigital number in base n), A185122 (smallest pandigital prime in base n), A260182 (smallest square that is pandigital in base n), A260117 (smallest triangular number that is pandigital in base n).
Sequence in context: A182528 A185583 A309792 * A155901 A029745 A332067
KEYWORD
nonn,base
AUTHOR
Jon E. Schoenfield, Sep 02 2018
STATUS
approved