A386139 Primes having only {2, 3, 4, 5} as digits.
2, 3, 5, 23, 43, 53, 223, 233, 353, 433, 443, 523, 2243, 2333, 2423, 2543, 3253, 3323, 3343, 3433, 3533, 4243, 4253, 4423, 4523, 5233, 5323, 5333, 5443, 22343, 22433, 22453, 22543, 23333, 24223, 24443, 24533, 25243, 25253, 25343, 25423, 25453, 25523, 32233, 32323
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 3, 4, 5]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 3, 4, 5}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 3, 4, 5]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2345"), 41))) # uses function/imports in A385776