A385775 Primes having only {1, 2, 8} as digits.
2, 11, 181, 211, 281, 811, 821, 881, 1181, 1811, 2111, 2221, 2281, 8111, 8221, 8821, 11821, 12211, 12281, 12821, 18121, 18181, 18211, 21121, 21211, 21221, 21821, 21881, 22111, 22811, 28111, 28181, 28211, 81181, 81281, 82811, 88211, 88811, 111121
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("128"), 41))) # uses function/imports in A385776