OFFSET
1,1
COMMENTS
Let g1 = q-p, g2 = r-q, g3 = s-r be the gaps between the consecutive primes p,q,r,s. Then p*s = (q-g1)*(q+g2+g3) == -g1*(g2+g3) (mod q) and similarly p*s == -(g1+g2)*g3 (mod r). According to Cramer's conjecture, g1*(g2+g3) < q and (g1+g2)*g3 < r for all but finitely many p: the only exception in this sequence appears to be p=3. When g1*(g2+g3) < q and (g1+g2)*g3 < r we have ((p*s) mod r) - ((p*s) mod q) = (r - (g1+g2)*g3) - (q - g1*(g2+g3)) = g2*(g1-g3+1). This is 2 (allowing the possibility of twin primes) if g2 = 2 and g3 = g1.
LINKS
Robert Israel, Table of n, a(n) for n = 1..2700
EXAMPLE
a(3) = 53 is a member because with p=53, q=59, r=61 and s=67 we have (53*67) mod 59 = 11 and (53*67) mod 61 = 13, and 11 and 13 are a pair of twin primes.
MAPLE
p2:= 2: p3:= 3: p4:= 5: R:= NULL: count:= 0:
while count < 100 do
p1:= p2; p2:= p3; p3:= p4;
p4:= nextprime(p4);
r2:= (p1*p4) mod p2;
r3:= (p1*p4) mod p3;
if r3 = r2 + 2 and isprime(r2) and isprime(r3) then
R:= R, p1; count:= count+1;
fi
od:
R;
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Nov 06 2020
STATUS
approved