login
A319304
Integers q for which f(q) = ((((q - 1)! + 1) / q) + 1) / (q + 1) is a prime number.
1
7, 17, 31, 67, 89
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.
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
Sequence in context: A024835 A225251 A178491 * A144861 A066436 A128002
KEYWORD
nonn,hard,more
AUTHOR
Rashid Naimi, Sep 16 2018
EXTENSIONS
1621 and 1699, which do not belong here, removed by Rashid Naimi, Mar 21 2019
STATUS
approved