A386158 Primes having only {2, 4, 7, 9} as digits.
2, 7, 29, 47, 79, 97, 227, 229, 277, 449, 479, 499, 727, 797, 929, 947, 977, 997, 2297, 2447, 2477, 2729, 2749, 2777, 2797, 2927, 2999, 4229, 4297, 4447, 4729, 4799, 4999, 7229, 7247, 7297, 7477, 7499, 7727, 7927, 7949, 9227, 9277, 9479, 9497, 9749, 9929, 9949
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 7, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 7, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 4, 7, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2479"), 41))) # uses function/imports in A385776