login
Primes p such that if the next prime is q, (q-p-1)! mod p is prime.
1

%I #28 Mar 29 2022 15:11:45

%S 23,61,73,83,211,409,449,509,719,787,829,887,1039,1237,1409,1459,1627,

%T 1831,1879,1913,2089,2179,2297,2521,2647,2663,2699,2879,2909,2927,

%U 3011,3041,3049,3121,3209,3331,3361,3433,3491,3583,3659,3719,3863,3889,3967,4289,4327,4349,4363,4373,4583,4679

%N Primes p such that if the next prime is q, (q-p-1)! mod p is prime.

%C Primes p such that the product of composites between p and the next prime has prime remainder on division by p.

%H Robert Israel, <a href="/A351377/b351377.txt">Table of n, a(n) for n = 1..10000</a>

%e a(3) = 73 is a term because 73 is prime, the next prime is 79, (79-73-1)! = 120 and 120 mod 73 = 47 is prime.

%p R:= NULL: count:= 0: q:= 2:

%p while count < 100 do

%p p:= q; q:= nextprime(p);

%p if isprime((q-p-1)! mod p) then

%p count:= count+1; R:= R, p;

%p fi

%p od:

%p R;

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Mar 28 2022