A386164 Primes having only {2, 5, 8, 9} as digits.
2, 5, 29, 59, 89, 229, 599, 829, 859, 929, 2999, 8599, 8929, 8999, 9829, 9859, 9929, 22229, 22259, 22859, 25229, 25589, 25889, 25999, 28229, 28289, 28559, 28859, 29599, 29959, 29989, 52259, 52289, 52529, 52859, 52889, 52999, 55229, 55259, 55529, 55589, 55829
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 5, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 5, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 5, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2589"), 41))) # uses function/imports in A385776