A386154 Primes having only {2, 4, 5, 9} as digits.
2, 5, 29, 59, 229, 449, 499, 599, 929, 2459, 2549, 2999, 4229, 4259, 4549, 4999, 5449, 9929, 9949, 22229, 22259, 22549, 24229, 24499, 25229, 25999, 29429, 29599, 29959, 42299, 42499, 42929, 44249, 44449, 44549, 44959, 45259, 45599, 45949, 45959, 49429, 49459
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 5, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 5, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 4, 5, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2459"), 41))) # uses function/imports in A385776