A386162 Primes having only {2, 5, 7, 8} as digits.
2, 5, 7, 227, 257, 277, 557, 577, 587, 727, 757, 787, 827, 857, 877, 887, 2287, 2557, 2777, 2857, 2887, 5227, 5527, 5557, 5827, 5857, 7577, 7727, 7757, 7877, 8287, 8527, 8887, 22277, 22727, 22777, 22787, 22877, 25577, 27277, 27527, 27827, 28277, 52727, 52757
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 5, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 5, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 5, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2578"), 41))) # uses function/imports in A385776