A152427 Primes that have both prime digits (2,3,5,7) and nonprime digits (1,4,6,8,9).
13, 17, 29, 31, 43, 47, 59, 67, 71, 79, 83, 97, 103, 107, 113, 127, 131, 137, 139, 151, 157, 163, 167, 173, 179, 193, 197, 211, 229, 239, 241, 251, 263, 269, 271, 281, 283, 293, 311, 313, 317, 331, 347, 349, 359, 367, 379, 383, 389, 397, 421, 431, 433, 439
Offset: 1
Programs
-
Mathematica
okQ[n_] := Module[{d = Union[IntegerDigits[n]]}, Length[Intersection[d, {2, 3, 5, 7}]] > 0 && Length[Intersection[d, {1, 4, 6, 8, 9}]] > 0]; Select[Prime[Range[100]], okQ] (* T. D. Noe, Jan 21 2011 *) pdQ[n_]:=Module[{idn=Select[IntegerDigits[n],#!=0&]},Count[idn,?PrimeQ]>0&&Count[idn,?(!PrimeQ[#]&)]>0]; Select[Prime[Range[100]],pdQ] (* Harvey P. Dale, Jan 31 2013 *)
Formula
a(n) ~ n log n
Extensions
Corrected and extended by Harvey P. Dale, Jan 31 2013
Comments