A386112 Primes having only {1, 3, 5, 8} as digits.
3, 5, 11, 13, 31, 53, 83, 113, 131, 151, 181, 311, 313, 331, 353, 383, 811, 853, 881, 883, 1151, 1153, 1181, 1381, 1511, 1531, 1553, 1583, 1811, 1831, 3181, 3313, 3331, 3511, 3533, 3581, 3583, 3833, 3851, 3853, 3881, 5113, 5153, 5333, 5351, 5381, 5531, 5581, 5813
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 5, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 5, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 5, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1358"), 41))) # uses function/imports in A385776