3
$\begingroup$

What I have tried so far: $n$ certainly can't be prime. It also can't be a power of prime as $\varphi(p^k)=p^k-p^{k-1})$ unless it is $25=5^2$. From here on, I am pretty stuck. I tried considering the prime factorization of $n$, or perhaps looking for some contradiction, which would show $n$ must be a power of a single prime, but cannot make progress: Let $n=p_1^{e_1}...p_k^{e_k}$. Then $$n(1-\frac 1{p_1})...(1-\frac 1{p_k})=p_1^{e_1}...p_k^{e_k}-5.$$ Do I need to consider modulo 5? I also thought about considering whether or not $5\mid n$ or whether $n$ is even/odd, but cannot seem to make progress.


I found this similar question asked on StackExchange a while ago, but since the RHS is $n-2$, they could consider restrictions with parity. I also don't get why they could assume that $n=pq$ is a product of exactly 2 distinct primes only for the contradiction.

$\endgroup$
2

3 Answers 3

5
$\begingroup$

Hint: Let $p$ be a prime dividing $n = \displaystyle\prod_{j}p_j^{e_j}$. Then, $$n-5 = \phi(n) = n\prod_{j}(1-\tfrac{1}{p_j}) \le n(1-\tfrac{1}{p}),$$ and thus, $1-\tfrac{5}{n} \le 1-\tfrac{1}{p}$, i.e., $\tfrac{n}{p} \le 5$.

Since $\tfrac{n}{p}$ must be an integer, we have $\tfrac{n}{p} \in \{1,2,3,4,5\}$. Hence, $n$ must be in the form $n = p, 2p, 3p, 4p, 5p$ for some prime $p$.

Can you try out each of these cases?

$\endgroup$
6
  • $\begingroup$ Since there is no upper bound for $p$, I take it that there are infintely many possible solutions then? $\endgroup$
    – Jason Xu
    Commented Jan 24 at 3:43
  • $\begingroup$ Nice nice nice... $\endgroup$ Commented Jan 24 at 3:47
  • 1
    $\begingroup$ @JasonXu No. What I did there is rule out every $n$ that is not in one of those forms. That doesn't mean that any $n$ in one of those five forms works. Just that you have to try them out. For example, if $n = p$ for some prime $p$, then $\phi(n) = \phi(p) = p-1 = n-1 > n-5$, so no value of $n$ works in that case. See if you can try out the other 4 cases yourself. $\endgroup$
    – JimmyK4542
    Commented Jan 24 at 4:02
  • 1
    $\begingroup$ Since $\varphi(n)$ is even for $n \ge 3$, $n-5$ must be even, which means that $n$ must be odd. So, one could immediately eliminate $2p$ and $4p$ as possible solutions for $n$. $\endgroup$ Commented Jan 24 at 6:13
  • 1
    $\begingroup$ That $\varphi $ is multiplicative is relatively hard. It's essentially the Chinese remainder theorem. But if you know it, and you probably do, you can polish off $3p$ and $5p$. $\endgroup$ Commented Jan 24 at 7:22
4
$\begingroup$

I think you've got the only solution. As you said, $n$ can't be prime and as pointed out in a comment, if $n>2$, the totient of $n$ is even. So $n$ must be odd and composite. If we assume that $n$ is the product of 2 distinct odd primes, we have $$n-\phi(n)=p_1p_2-(p_1-1)(p_2-1)=p_1+p_2-1=5$$

But the smallest odd primes we can pick are 3 and 5. And adding more distinct primes to the mix is going to make the minimum value of $n-\phi(n)$ much larger. So $n$ can't be the product of distinct primes.

Finally, if $n$ is a multiple of $p^2$ for some prime $p$, then the totient will be a multiple of $p$. If $p|n$ and $p|\phi(n)$, then $p|[n-\phi(n)]$, so $p|5$. There might be a few gaps, but it's pretty clear the only solution is $5^2=25$.

$\endgroup$
3
$\begingroup$

If $n\ge 6$ (to make $n-5$ positive) is prime then $\phi(n)=n-1\not=n-5$. Otherwise $n$ has to have a prime factor $q\le\sqrt{n}$ forciing

$\phi(n)\le n\left(1-\dfrac1{q}\right)\le n-\sqrt{n}.$

So

$\phi(n)=n-5\implies n\not\in\mathbb{P}\text{ and }6\le n\le25.$

Also $\phi(n)$ is even for $n\ge 3$ so

$\phi(n)=n-5\implies n\in2\mathbb{N}+1.$

So $n$ must be odd, composite, at least $6$ and at most $25$. Only $9,15,21,25$ survive as candidates and among these, only $25$ checks affirmatively.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .