A346168 Primes p such that p*p! - 1 is prime.
2, 3, 5, 7, 11, 397, 599, 2239
Offset: 1
Programs
-
Maple
select(p -> isprime(p) and isprime(p*factorial(p) - 1), [$2 .. 600])
-
Mathematica
Select[Range[2, 600], PrimeQ[#] && PrimeQ[#*#! - 1] &] Select[Prime[Range[110]],PrimeQ[# #!-1]&] (* The program generates the first 7 terms of the sequence. *) (* Harvey P. Dale, Feb 12 2025 *)
-
PARI
a = List(); for(p=2, 600, if(isprime(p) && isprime(p*p!-1), listput(a, p))); a
-
Sage
[p for p in range(2, 600) if is_prime(p) and is_prime(p*factorial(p) - 1)]
Comments