Number of ending symbols of prime numbers written in different bases

arithmeticelementary-number-theorynumber theoryprime numbers

In base $b=10$, all prime numbers (except $2$ and $5$) end with one among the four symbols $1,3,7,9$. Therefore, between $10\cdot k$ and $10\cdot (k+1)$, there can be found $0,1,2,3$ or $4$ prime numbers.

In which base $b_N$ do all prime numbers end with one among $N$ symbols?
And how many primes can be found between $b_N\cdot k$ and $b_N\cdot (k+1)$?

I apologize in case this is an obvious question. However, thanks for your help!

Best Answer

This behaviour is because $10$ itself is not prime.

Consider some other non-prime bases.

$16$ - Hexadecimal - With extra symbols $A, B, C, D, E, F$. Numbers ending in $0, 2, 4, 6, 8, A, C, E$ will never be prime since they will be even.

$12$ - With extra symbols $A, B$. Numbers ending in $0, 2, 3, 4, 6, 8, 9, A$ will never be prime since they will be multiples of $2$ or $3$ or both.

Consider prime bases.

$2$

Apart from $2$ itself, which will appear as $10$ in base $2$, numbers ending in $0$ won't be prime. Primes can be found ending in any other digit. Of course, any other digit is just $1$ so that is not very interesting.

$7$

Primes can be found ending in any digit other than $0$.

Similarly, to base $2$, $7$ will appear as $10$. Any other number ending in $0$ will not be prime.

Other bases

In general, a number written in its own base will appear as $10$ hence if the base is prime then this will be prime. Avoid thinking of $10$ as "ten" when working in alternative bases.

What Benedict is saying is that my example of $7$ is typical of prime bases. If the base is prime then you can find primes ending in any digit other than $0$. Actually, he is saying a bit more. You will be able to find infinitely many primes ending in a digit other than $0$. More still, even if the base is not prime, if the digit is coprime to the base then you can find infinitely many primes ending in it. So, infinitely many primes end in $1$ in base 2 (this just says that there are infinitely many odd primes). Also infinitely many primes end in $7$ in base $10$.

This may help: Dirichlet's theorem on arithmetic progressions