OFFSET
1,1
COMMENTS
EXAMPLE
10 is a term, since 10! = 3628800 and 3628811 is prime.
MAPLE
q:= n-> (f-> isprime(f+(10^padic[ordp](f, 10)-1)/9))(n!):
select(q, [$1..500])[]; # Alois P. Heinz, Feb 10 2021
MATHEMATICA
tz1Q[n_]:=Module[{idn=Split[IntegerDigits[n!]]}, PrimeQ[ FromDigits[ Flatten[ Join[ Most[ idn], Last[idn]/.(0->1)]]]]]; Select[ Range[ 1800], tz1Q] (* Harvey P. Dale, Oct 01 2015 *)
PROG
(Python)
from sympy import isprime
from math import factorial
def ok(n):
s, zeros = str(factorial(n)), 0
while s[-1] == '0': s = s[:-1]; zeros += 1
return isprime(int(s + '1'*zeros))
print([m for m in range(500) if ok(m)]) # Michael S. Branicky, Feb 10 2021
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
Giovanni Resta, Mar 07 2006
STATUS
approved