A386086 Primes having only {1, 2, 3, 5} as digits.
2, 3, 5, 11, 13, 23, 31, 53, 113, 131, 151, 211, 223, 233, 251, 311, 313, 331, 353, 521, 523, 1123, 1151, 1153, 1213, 1223, 1231, 1321, 1511, 1523, 1531, 1553, 2111, 2113, 2131, 2153, 2213, 2221, 2251, 2311, 2333, 2351, 2521, 2531, 2551, 3121, 3221, 3251, 3253
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 3, 5]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 3, 5}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 3, 5]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1235"), 41))) # uses function/imports in A385776