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
KEYWORD
nonn,base
AUTHOR
Jon E. Schoenfield, Sep 02 2018
STATUS
approved