A385798 Primes having only {5, 8, 9} as digits.
5, 59, 89, 599, 859, 8599, 8999, 9859, 55589, 55889, 58889, 59999, 85889, 85999, 88589, 89599, 89899, 89959, 89989, 95959, 95989, 98899, 98999, 99559, 99859, 99989, 555589, 558599, 559859, 585889, 585899, 585989, 589859, 598999, 599899, 599959, 599999, 855889
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [5, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{5, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [5, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("589"), 41))) # uses function/imports in A385776