A386089 Primes having only {1, 2, 3, 8} as digits.
2, 3, 11, 13, 23, 31, 83, 113, 131, 181, 211, 223, 233, 281, 283, 311, 313, 331, 383, 811, 821, 823, 881, 883, 1123, 1181, 1213, 1223, 1231, 1283, 1321, 1381, 1811, 1823, 1831, 2111, 2113, 2131, 2213, 2221, 2281, 2311, 2333, 2381, 2383, 2833, 3121, 3181, 3221
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 3, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 3, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 3, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1238"), 41))) # uses function/imports in A385776