Finding bound counting primes which end by $3$

28 Views Asked by At

I am trying to count the number of prime numbers which end by digit "$3$" such as $3, 13, 23$, etc. and are below $10^6$.

The number of primes existing below $10^6$ is known empirically to be $78~ 498$. Because, at most 1 every 10 numbers ends by the digit 3, it means that, at most there could be $7850$. So this is the lowest bound I have found so far.

Is this lower bound correct? I thought so, but when trying to answer in a questionnaire, it is said my result is wrong: enter image description here

What is the problem?

2

There are 2 best solutions below

2
On

For primes greater than $5$ the last digit is always $1,3,7,$ or $9$. Any other last digit means the number is divisible by $2$ or $5$. They are approximately equally distributed so you would have about $19,500$

0
On

Oh! I found the mistake. My mistake was thinking that at most 1 of every 10 number in 78 498 prime numbers below $10^6$ could be 3. Because those do not include all numbers, but only the ones which are primes.