OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 3137 is a term because 3137 is prime, the next prime is 3163 = 3137+26, and neither 26-1 = 25 nor 26+1 = 27 is prime.
MAPLE
q:= 2:
count:= 0:
R:= NULL:
while count < 100 do
p:= q;
q:= nextprime(q);
g:= q-p;
if not(isprime(g-1) or isprime(g+1)) then
count:= count+1;
R:= R, p
fi
od:
R;
PROG
(PARI) isok(p) = if (isprime(p), my(g=nextprime(p+1)-p); !isprime(g-1) && !isprime(g+1)); \\ Michel Marcus, Jul 05 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 04 2022
STATUS
approved