A385786 Primes having only {2, 5, 9} as digits.
2, 5, 29, 59, 229, 599, 929, 2999, 9929, 22229, 22259, 25229, 25999, 29599, 29959, 52259, 52529, 52999, 55229, 55259, 55529, 59929, 59999, 92959, 95929, 95959, 99259, 99529, 99559, 99929, 225299, 225529, 229529, 252559, 255259, 259229, 295259, 522229, 522259
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 5, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 5, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 5, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("259"), 41))) # uses function/imports in A385776