OFFSET
1,1
COMMENTS
This is the general form : (p-n)/(n+1)=primeand(n+1)*p+n=prime; 'Safe' primes and'Sophie Germain' primes just one part of this general form; If n=1 then we got'Safe' primes and'Sophie Germain' primes.
MATHEMATICA
lst={}; n=127; Do[p=Prime[k]; If[PrimeQ[(p-n)/(n+1)]&&PrimeQ[(n+1)*p+n], AppendTo[lst, p]], {k, 2*9!}]; lst
Select[Prime[Range[250000]], AllTrue[{(#-127)/128, 128#+127}, PrimeQ]&] (* Harvey P. Dale, Apr 30 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Dec 02 2008
EXTENSIONS
Definition clarified by Harvey P. Dale, Apr 30 2023
STATUS
approved