From Srivatsan Narayan'sNarayanan's comment: there are on the order of $n^7$ numbers satisfying the digit constraint, with $n$ digits. The probability that a random $n$-digit number is prime is of order $1/n$. So naively there are on the order of $n^6$ $n$-digit numbers satisfying all the conditions. The sum of sixth powers diverges (quite strongly!) and I suspect the answer is infinitely many and would be quite surprised to learn otherwise. In particular the number of such integers with $n$ digits or less "ought to be" on the order of $1^6 + 2^6 + \cdots + n^6$, or on the order of $n^7$; the number of such integers less than or equal to $x$, then, is on the order of $\log_{10} (Cx^7)$ for some constant $C$, or about $7 \log_{10} x$.
J. M. ain't a mathematician
- 75.4k
- 8
- 210
- 340