# distribution of primes with reference to last digit [duplicate]

This question already has an answer here:

Any prime greater than 5 shall have 1,3,7 or 9 as last digit. Are the primes equally distributed among the above four last digits or any bias for any particular last digit say up to 10 to the power 12 or higher. I have recently read an article in Scientific American that adjacent primes are unlikely to share the same last digit. Is it possible to predict the distribution among the last digits as we go higher?

## marked as duplicate by vrugtehagel, J.-E. Pin, Pragabhava, user147263, WatsonMar 15 '16 at 19:06

For every integer $m\ge 2$ and for every positive integer $n<m$ coprime to $m$ the proportion of primes $p$ of the form $p\equiv n\ (\ mod\ m\ )$ is $\frac{1}{\phi(m)}$, in other words, in the long run, the primes are evenly distributed among the possible classes.