OFFSET
1,2
COMMENTS
k is in the sequence if there are no primes p < sqrt(2*k-2) such that 2*k-p is prime.
There are no other terms < 10^7.
Conjecture: 31637 is the last term.
EXAMPLE
a(7)=9 is in the sequence because the primes < sqrt(2*9-2)=4 are 2 and 3, and neither 2*9-2=16 nor 2*9-3=15 is prime.
MAPLE
P:= NULL: Res:= 1: nextp:= 2:
for n from 2 to 10^6 do
while nextp^2 < 2*n-2 do
P:= P, nextp;
nextp:= nextprime(nextp);
od;
if andmap(t -> not isprime(2*n-t), [P]) then
Res:= Res, n
fi;
od:
Res;
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Apr 30 2019
STATUS
approved