OFFSET
1,1
COMMENTS
a(8) > 40000000 if it exists.
Note that p*q == (r-p)*(r-q) (mod r). As soon as the prime gap grows slow enough, for all large enough p we have (p*q) mod r = (r-p)*(r-q), which is composite, implying finiteness of this sequence. In particular, finiteness would follow from Cramer's conjecture. - Max Alekseyev, Nov 09 2024
EXAMPLE
a(3)=19 is in the sequence because it is prime, the next two primes are 23 and 29, and (19*23) mod 29 = 2, which is prime.
MAPLE
R:= NULL: q:= 2: r:= 3:
count:= 0:
for i from 1 to 10000 do
p:= q; q:= r; r:= nextprime(r);
if isprime(p*q mod r) then count:= count+1; R:= R, p fi
od:
R;
CROSSREFS
KEYWORD
nonn,more,changed
AUTHOR
J. M. Bergot and Robert Israel, Nov 02 2020
STATUS
approved