A385778 Primes having only {1, 3, 8} as digits.
3, 11, 13, 31, 83, 113, 131, 181, 311, 313, 331, 383, 811, 881, 883, 1181, 1381, 1811, 1831, 3181, 3313, 3331, 3833, 3881, 8111, 8311, 8831, 11113, 11131, 11311, 11383, 11813, 11831, 11833, 13183, 13313, 13331, 13381, 13831, 13883, 18131, 18133, 18181, 18311
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("138"), 41))) # uses function/imports in A385776