A108419 Primes with at least one of each prime digit.
2357, 2753, 3257, 3527, 5237, 5273, 7253, 7523, 22573, 23357, 23537, 23557, 23753, 25237, 25357, 25373, 25537, 25733, 27253, 32257, 32537, 32573, 35227, 35257, 35327, 35527, 37253, 52237, 52733, 53327, 53527, 57223, 72253, 72353, 72533, 73523, 75223, 75253
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A019546 (primes whose digits are primes).
Programs
-
Mathematica
Select[Table[Prime[n],{n,7200}],ContainsExactly[IntegerDigits[#],{2,3,5,7}]&] (* James C. McMahon, Mar 05 2024 *)
-
Python
from sympy import isprime from itertools import count, islice, product def agen(): yield from (t for d in count(4) for b in product("2357", repeat=d-1) for e in "37" if len(set(b+(e,)))==4 and isprime(t:=int("".join(b)+e))) print(list(islice(agen(), 40))) # Michael S. Branicky, Mar 05 2024
Extensions
Offset corrected by Arkadiusz Wesolowski, Oct 18 2011
Comments