A118505 Sophie Germain primes for which the product of the digits is also a Sophie Germain prime.
2, 3, 5, 113, 131, 1511, 111111113, 1111111121, 1111111111111111111111111111111121, 111111111111111111111111111111111111131, 111111111113111111111111111111111111111, 111111131111111111111111111111111111111111111111111111111
Offset: 1
Examples
131 is in the sequence because (1) it is a Sophie Germain prime and (2) the product of its digits 1*3*1=3 is also a Sophie Germain prime.
Crossrefs
Cf. A005384.
Programs
-
Mathematica
Select[FromDigits/@(Flatten[Permutations/@Flatten[Table[PadRight[{n},k,1],{n,{1,2,3,5}},{k,60}],1],1]),AllTrue[ {#,2#+1,Times@@ IntegerDigits[ #],2Times@@ IntegerDigits[ #]+ 1},PrimeQ]&]//Sort (* Harvey P. Dale, Jul 30 2019 *)
Extensions
More terms from Hans Havermann, May 07 2006
Comments