OFFSET
1,1
COMMENTS
35=5*7; 5 and 7 are safe primes, 55=5*11; 5 and 11 are safe primes,...
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 35 since 35 = 5 * 7, and (5 - 1)/2 = 2 and (7 - 1)/2 = 3 are both prime, thus 5 and 7 are distinct safe primes.
MATHEMATICA
lst={}; Do[If[Plus@@Last/@FactorInteger[n]==2, a=Length[First/@FactorInteger[n]]; If[a==2, b=First/@FactorInteger[n]; c=b[[1]]; d=b[[2]]; If[PrimeQ[(c-1)/2]&&PrimeQ[(d-1)/2], AppendTo[lst, n]]]], {n, 7!}]; lst
Select[Select[Range@ 3000, PrimeNu@ # == 2 &], Times @@ Map[If[PrimeQ[(# - 1)/2], #, 0] &, Map[First, FactorInteger@ #]] == # &] (* Michael De Vlieger, Feb 28 2016 *)
Module[{upto=3000, sp}, sp=Select[Prime[Range[PrimePi[upto/5]]], PrimeQ[(#-1)/2]&]; Select[Union[Times@@@Subsets[sp, {2}]], #<+upto&]] (* Harvey P. Dale, Aug 25 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Feb 27 2009
EXTENSIONS
Example corrected by Harvey P. Dale, Aug 25 2017
STATUS
approved