A386111 Primes having only {1, 3, 5, 7} as digits.
3, 5, 7, 11, 13, 17, 31, 37, 53, 71, 73, 113, 131, 137, 151, 157, 173, 311, 313, 317, 331, 337, 353, 373, 557, 571, 577, 733, 751, 757, 773, 1117, 1151, 1153, 1171, 1373, 1511, 1531, 1553, 1571, 1733, 1753, 1777, 3137, 3313, 3331, 3371, 3373, 3511, 3517, 3533
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 5, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 5, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 5, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1357"), 41))) # uses function/imports in A385776