A386088 Primes having only {1, 2, 3, 7} as digits.
2, 3, 7, 11, 13, 17, 23, 31, 37, 71, 73, 113, 127, 131, 137, 173, 211, 223, 227, 233, 271, 277, 311, 313, 317, 331, 337, 373, 727, 733, 773, 1117, 1123, 1171, 1213, 1217, 1223, 1231, 1237, 1277, 1321, 1327, 1373, 1721, 1723, 1733, 1777, 2111, 2113, 2131, 2137
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 3, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 3, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 3, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1237"), 41))) # uses function/imports in A385776