OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 2657 is a term because the four consecutive primes starting with 2657 are 2657, 2659, 2663, 2671, and 2657 * 2659 * 2663 * 2671 - (2657 + 2659 + 2663 + 2671) = 50252184558049 and 2657 * 2659 * 2663 * 2671 + (2657 + 2659 + 2663 + 2671) = 50252184579349 are prime.
MAPLE
q:= 2: r:= 3: s:= 5:
Res:= NULL: count:= 0:
for i from 1 while count < 100 do
p:= q; q:= r; r:= s; s:= nextprime(s);
a:= p*q*r*s; b:= p+q+r+s;
if isprime(a+b) and isprime(a-b) then
count:= count+1; Res:= Res, p
fi
od:
Res;
MATHEMATICA
Select[Partition[Prime[Range[25000]], 4, 1], AllTrue[Times @@ # + {Plus @@ #, -Plus @@ #}, PrimeQ] &][[All, 1]] (* Paolo Xausa, Dec 01 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Will Gosnell and Robert Israel, Nov 24 2025
STATUS
approved
