A386085 Primes having only {1, 2, 3, 4} as digits.
2, 3, 11, 13, 23, 31, 41, 43, 113, 131, 211, 223, 233, 241, 311, 313, 331, 421, 431, 433, 443, 1123, 1213, 1223, 1231, 1321, 1423, 1433, 2111, 2113, 2131, 2141, 2143, 2213, 2221, 2243, 2311, 2333, 2341, 2411, 2423, 2441, 3121, 3221, 3313, 3323, 3331, 3343, 3413
Offset: 1
Links
Crossrefs
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 3, 4]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 3, 4}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 3, 4]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1234"), 41))) # uses function/imports in A385776