A385789 Primes having only {2, 7, 8} as digits.
2, 7, 227, 277, 727, 787, 827, 877, 887, 2287, 2777, 2887, 7727, 7877, 8287, 8887, 22277, 22727, 22777, 22787, 22877, 27277, 27827, 28277, 72227, 72277, 72287, 72727, 78277, 78787, 78877, 78887, 82727, 82787, 87277, 87877, 87887, 222787, 222877, 227827, 228887
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("278"), 41))) # uses function/imports in A385776