A386198 Primes having only {5, 6, 8, 9} as digits.
5, 59, 89, 569, 599, 659, 859, 5569, 5659, 5669, 5689, 5869, 6569, 6599, 6659, 6689, 6869, 6899, 6959, 8599, 8669, 8689, 8699, 8969, 8999, 9689, 9859, 55589, 55889, 56569, 56599, 56659, 56989, 56999, 58699, 58889, 59659, 59669, 59699, 59999, 65599, 65699, 65899
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [5, 6, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{5, 6, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [5, 6, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("5689"), 41))) # uses function/imports in A385776