A386191 Primes having only {4, 5, 7, 9} as digits.
5, 7, 47, 59, 79, 97, 449, 457, 479, 499, 547, 557, 577, 599, 757, 797, 947, 977, 997, 4447, 4457, 4547, 4549, 4597, 4759, 4799, 4957, 4999, 5449, 5477, 5479, 5557, 5749, 5779, 7457, 7459, 7477, 7499, 7547, 7549, 7559, 7577, 7757, 7759, 7949, 9479, 9497, 9547
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 5, 7, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{4, 5, 7, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [4, 5, 7, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("4579"), 41))) # uses function/imports in A385776