login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes p such that (q*s-p*r)/2 and |p*s-q*r|/2 are both prime, where p,q,r,s are consecutive primes.
1

%I #45 Dec 24 2023 17:06:53

%S 313,773,1451,1733,2417,2531,3041,3673,7187,7297,7309,7349,9479,9649,

%T 10247,10631,11003,11941,12197,12739,13163,14449,16427,16811,19801,

%U 21089,22639,24029,24781,26141,26237,26713,29399,30097,30161,30869,31051,33083,33931,34667,37907,40519,40543,40973,41387

%N Primes p such that (q*s-p*r)/2 and |p*s-q*r|/2 are both prime, where p,q,r,s are consecutive primes.

%C Intersection of A342505 with union of A342508 and A342509.

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

%e a(3) = 1451 is a term because 1451, 1453, 1459, 1471 are consecutive primes with (1453*1471-1451*1459)/2 = 10177 and |1451*1471-1453*1459|/2 = 7247 both prime.

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

%p q:= 3: r:= 5: s:= 7:

%p while count < 100 do

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

%p if isprime(abs(p*s-q*r)/2) and isprime((q*s-p*r)/2) then

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

%p fi

%p od:

%p R:

%t Select[Partition[Prime[Range[4500]],4,1],AllTrue[{(#[[2]]#[[4]]-#[[1]]#[[3]])/2,(#[[1]]#[[4]]- #[[2]] #[[3]])/2},PrimeQ]&][[;;,1]] (* _Harvey P. Dale_, Dec 24 2023 *)

%Y Cf. A342505, A342508, A342509.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Mar 14 2021