A386157 Primes having only {2, 4, 7, 8} as digits.
2, 7, 47, 227, 277, 487, 727, 787, 827, 877, 887, 2287, 2447, 2477, 2777, 2887, 4447, 4787, 4877, 7247, 7477, 7487, 7727, 7877, 8287, 8447, 8747, 8887, 22247, 22277, 22447, 22727, 22777, 22787, 22877, 24247, 24847, 24877, 27277, 27427, 27487, 27827, 27847, 28277
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 4, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2478"), 41))) # uses function/imports in A385776