A386190 Primes having only {4, 5, 7, 8} as digits.
5, 7, 47, 457, 487, 547, 557, 577, 587, 757, 787, 857, 877, 887, 4447, 4457, 4547, 4787, 4877, 5477, 5557, 5857, 7457, 7477, 7487, 7547, 7577, 7757, 7877, 8447, 8747, 8887, 44587, 44777, 44887, 45557, 45587, 45757, 45887, 47777, 47857, 48487, 48757, 48787, 48847
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 5, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{4, 5, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [4, 5, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("4578"), 41))) # uses function/imports in A385776