A385785 Primes having only {2, 4, 9} as digits.
2, 29, 229, 449, 499, 929, 2999, 4229, 4999, 9929, 9949, 22229, 24229, 24499, 29429, 42299, 42499, 42929, 44249, 44449, 49429, 49499, 49999, 94229, 94949, 94999, 99929, 222499, 224299, 224429, 224449, 224929, 229249, 229499, 229949, 242449, 242999, 244429
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 4, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("249"), 41))) # uses function/imports in A385776