A386120 Primes having only {1, 4, 5, 7} as digits.
5, 7, 11, 17, 41, 47, 71, 151, 157, 457, 541, 547, 557, 571, 577, 751, 757, 1117, 1151, 1171, 1447, 1451, 1471, 1511, 1571, 1741, 1747, 1777, 4111, 4157, 4177, 4441, 4447, 4451, 4457, 4517, 4547, 4751, 5147, 5171, 5417, 5441, 5471, 5477, 5557, 5711, 5717, 5741
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 4, 5, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 4, 5, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 4, 5, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1457"), 41))) # uses function/imports in A385776