OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
R:= NULL: count:= 0:
q:= 2:
do
p:= q; q:= nextprime(p);
if isprime(p+(q-p)*q) and isprime(q+(q-p)*p) then
count:= count+1;
R:= R, p;
if count = 100 then break fi
fi
od:
R;
MATHEMATICA
Do[a=Prime[k]+Prime[k+1]*(Prime[k+1]-Prime[k]); b=Prime[k+1]+Prime[k]*(Prime[k+1]-Prime[k]); If[PrimeQ[a]&&PrimeQ[b], Print[Prime[k]]], {k, 1, 757}] (* Metin Sariyar, Sep 23 2019 *)
chpQ[{a_, b_}]:=AllTrue[{a+b(b-a), b+a(b-a)}, PrimeQ]; Select[Partition[ Prime[ Range[800]], 2, 1], chpQ][[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 05 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Sep 22 2019
STATUS
approved