|
|
A319304
|
|
Integers q for which f(q) = ((((q - 1)! + 1) / q) + 1) / (q + 1) is a prime number.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
f(89) is a 131-digit prime.
According to Wilson's theorem, f(q) can be an integer only if q is prime.
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Prime[Range[100]], PrimeQ[((((# - 1)! + 1) / #) + 1) / (# + 1)] &] (* Vincenzo Librandi, Sep 21 2018 *)
|
|
PROG
|
(PARI) forprime(q=7, 89, my(p = ((((q - 1)! + 1) / q) + 1) / (q + 1)); if(ispseudoprime(p), print1(q, ", ")))
(Magma) [n: n in [1..100] | IsPrime(n) and IsPrime((((Factorial(n-1)+1) div n)+1) div (n+1))]; // Vincenzo Librandi, Sep 21 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
1621 and 1699, which do not belong here, removed by Rashid Naimi, Mar 21 2019
|
|
STATUS
|
approved
|
|
|
|