1

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
    Is $5=\phi(n)$ for some $n$? – Angina Seng Oct 19 '18 at 18:47
  • 1
    Comments in the linked question advised you to study Euler's totient function $\phi(n).,$ Did you do so before posting this question? If so, where are you stuck? If not, then you should do so. – Bill Dubuque Oct 19 '18 at 18:48
  • Yes, but I did not understand much. I understood, as @LordSharktheUnknown said, that this is related to the totient function. But I don't know if I can evaluate all its values, since there is not a formula for the primes. Or what am I missing? –  Oct 19 '18 at 18:52
  • 1
    There is no $n$ such that $\phi(n)=5$, as $\phi(n)$ is even for $n>2$. – Servaes Oct 19 '18 at 19:09
  • @Servaes But sure! Many, many thanks! –  Oct 19 '18 at 19:14
  • Hmm, when I saw the title (before clicking and reading the question), I was thinking it was: is there any base in which every prime has its 5 last digits distinct? (To which the answer would be: no, by Dirichlet's theorem on primes in arithmetic sequences, in any base there are infinitely many primes ending in 11111.) – Daniel Schepler Oct 19 '18 at 19:16
  • You may be interested in this other question: https://math.stackexchange.com/questions/291334/values-taken-by-eulers-phi-function. However, the answer I gave there is fairly advanced compared to this question. – Erick Wong Oct 19 '18 at 19:17
  • @DanielSchepler I see. Sorry, maybe the title was misleading. I am not an expert of this field. –  Oct 19 '18 at 19:17
  • No, it's just fine, it would indeed be hard to be completely unambiguous in a title, that's why we have the question section. – Daniel Schepler Oct 19 '18 at 19:18

2 Answers2

1

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.

Bill Dubuque
  • 272,048
  • Thanks for the clever answer! I have to study more!!!! –  Oct 19 '18 at 20:52
  • Just a little, further question. Is there a way to be sure that, for instance, $\phi(n)=10$ only for $n=10$ and $n=11$? –  Oct 19 '18 at 22:24
  • @AndreaPrunotto $\phi(10) = 4$ as you mention in your question. You can use the formula for $\phi$ for things like that (see many prior questions). – Bill Dubuque Oct 19 '18 at 22:51
0

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.

Servaes
  • 63,261
  • 7
  • 75
  • 163