A386153 Primes having only {2, 4, 5, 7} as digits.
2, 5, 7, 47, 227, 257, 277, 457, 547, 557, 577, 727, 757, 2447, 2477, 2557, 2777, 4447, 4457, 4547, 5227, 5477, 5527, 5557, 7247, 7457, 7477, 7547, 7577, 7727, 7757, 22247, 22277, 22447, 22727, 22777, 24247, 24527, 24547, 25247, 25447, 25457, 25577, 25747, 27277
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 5, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 5, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 4, 5, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2457"), 41))) # uses function/imports in A385776