A386102 Primes having only {1, 2, 7, 8} as digits.
2, 7, 11, 17, 71, 127, 181, 211, 227, 271, 277, 281, 727, 787, 811, 821, 827, 877, 881, 887, 1117, 1171, 1181, 1187, 1217, 1277, 1721, 1777, 1787, 1811, 1871, 1877, 2111, 2221, 2281, 2287, 2711, 2777, 2887, 7121, 7127, 7177, 7187, 7211, 7717, 7727, 7817, 7877
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1278"), 41))) # uses function/imports in A385776