A386165 Primes having only {2, 6, 7, 8} as digits.
2, 7, 67, 227, 277, 677, 727, 787, 827, 877, 887, 2267, 2287, 2677, 2687, 2767, 2777, 2887, 6277, 6287, 6827, 7687, 7727, 7867, 7877, 8287, 8627, 8677, 8867, 8887, 22277, 22727, 22777, 22787, 22877, 26227, 26267, 26627, 26687, 26777, 27277, 27767, 27827, 28277
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 6, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 6, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 6, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2678"), 41))) # uses function/imports in A385776