A386199 Primes having only {5, 7, 8, 9} as digits.
5, 7, 59, 79, 89, 97, 557, 577, 587, 599, 757, 787, 797, 857, 859, 877, 887, 977, 997, 5557, 5779, 5857, 5879, 5897, 5987, 7559, 7577, 7589, 7757, 7759, 7789, 7877, 7879, 8597, 8599, 8779, 8887, 8999, 9587, 9787, 9857, 9859, 9887, 55579, 55589, 55787, 55799, 55889
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [5, 7, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{5, 7, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [5, 7, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("5789"), 41))) # uses function/imports in A385776