A386159 Primes having only {2, 4, 8, 9} as digits.
2, 29, 89, 229, 449, 499, 829, 929, 2999, 4229, 4289, 4889, 4999, 8429, 8849, 8929, 8999, 9829, 9929, 9949, 22229, 24229, 24499, 24889, 24989, 28229, 28289, 28429, 28499, 28949, 29429, 29989, 42299, 42499, 42829, 42899, 42929, 42989, 44249, 44449, 48299, 48449
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 4, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2489"), 41))) # uses function/imports in A385776