A base in which all primes end with $5$ different symbols?

120 Views Asked by At

In base $10$, all prime numbers (a part $2$ and $5$) end with $1,3,7$ or $9$, i.e. with four different symbols.

Is there a base in which all prime numbers end with $5$ different symbols (or also with $5$ distinct groups of symbols)? If yes, which base?

Thanks for your help! I apologize for such a trivial question!

NOTE: This question is related to this one.

2

There are 2 best solutions below

2
On BEST ANSWER

In base $b$, all prime numbers that do not divide $b$ end in a number between $0$ and $b$ coprime to $b$. Conversely, for every number between $0$ and $b$ coprime to $b$, there is a prime number ending in $b$. This follows from the prime number theorem for arithmetic progressions, for example. So the question becomes; for which numbers $b$ are there precisely $5$ numbers between $0$ and $b$ that are coprime to $b$. This number is denoted by $\phi(b)$, where $b$ is Euler's totient function. It is a simple result that $\phi(b)$ is even for all $b>2$, for example from the identity $$\phi\left(\prod_{i=1}^np_i^{k_i}\right)=\prod_{i=1}^np_i^{k_i-1}(p-1),$$ where the $p_i$ are distinct primes and the $k_i$ are positive integers.


In fact the only bases $b$ with $\phi(b)<5$ are $b=2,3,4,5,6,8,10,12$. Only in bases $5$ and $8$ do we get precisely $5$ different symbols in which primes can end, where we also count the divisors of the base.

3
On

Hint $ $ The number of residues coprime to $n> 2$ is even: $ $ negation reflection $\,x\mapsto -x\pmod {\!n}\,$ partitions them into pairs (since it has no fixed points: $\,-a\equiv a\,\Rightarrow\, n\mid 2a,\,$ contra $(n,a)=1)$.

Remark $\ $ Such use of reflections (or involutions) to pair-up terms frequently proves handy, e.g. see prior posts here on Wilson's theorem (in groups), esp. this one to start.