A386105 Primes having only {1, 3, 4, 5} as digits.
3, 5, 11, 13, 31, 41, 43, 53, 113, 131, 151, 311, 313, 331, 353, 431, 433, 443, 541, 1151, 1153, 1433, 1451, 1453, 1511, 1531, 1543, 1553, 3313, 3331, 3343, 3413, 3433, 3511, 3533, 3541, 4111, 4133, 4153, 4441, 4451, 4513, 5113, 5153, 5333, 5351, 5413, 5431, 5441
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 4, 5]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 4, 5}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 4, 5]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1345"), 41))) # uses function/imports in A385776