OFFSET
1,1
COMMENTS
Primes p such that neither p - 2 nor p + 2 is prime while (p - 1) / 2 is prime.
It is conjectured that there are infinitely many safe primes, but this is still unproved, so it is not known whether this sequence is infinite.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = 2 * A230117(n+1) + 1, for n > 0.
EXAMPLE
23 is a term because 23 - 2 = 21 and 23 + 2 = 25 are composite and (23 - 1) / 2 = 11 is prime.
MATHEMATICA
Select[Prime[Range[700]], Boole[PrimeQ[{#+2, #-2, (#-1)/2}]]=={0, 0, 1}&] (* Harvey P. Dale, Aug 14 2023 *)
PROG
(PARI) lista(nn) = { forprime(p=11, nn, if(!isprime(p+2) && isprime((p-1)/2), print1(p, ", "))); }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Jan 13 2017
STATUS
approved