A386171 Primes having only {3, 4, 5, 8} as digits.
3, 5, 43, 53, 83, 353, 383, 433, 443, 853, 883, 3343, 3433, 3533, 3583, 3833, 3853, 4483, 4583, 5333, 5443, 5483, 5843, 8353, 8443, 8543, 33343, 33353, 33533, 34483, 34543, 34583, 34843, 34883, 35353, 35533, 35543, 38333, 38453, 38543, 38833, 43543, 43853, 44383
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [3, 4, 5, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{3, 4, 5, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [3, 4, 5, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("3458"), 41))) # uses function/imports in A385776