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

number theoryprime numbers

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.

Best Answer

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.