A386093 Primes having only {1, 2, 4, 7} as digits.
2, 7, 11, 17, 41, 47, 71, 127, 211, 227, 241, 271, 277, 421, 727, 1117, 1171, 1217, 1277, 1427, 1447, 1471, 1721, 1741, 1747, 1777, 2111, 2141, 2221, 2411, 2417, 2441, 2447, 2477, 2711, 2741, 2777, 4111, 4127, 4177, 4211, 4217, 4241, 4271, 4421, 4441, 4447, 4721
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 4, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 4, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 4, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1247"), 41))) # uses function/imports in A385776