Given a positive integer $n$, let $\tau(n)$ denote the number of positive divisors of $n$ and $\varphi(n)$ denote the number of positive integers not exceeding $n$ that are relatively prime to $n$. Find all $n$ for which one of the three numbers $n,\tau(n), \varphi(n)$ is the arithmetic mean of the other two.
Problem
Source: Czech-Polish-Slovak 2012, P1
Tags: number theory, relatively prime, number theory unsolved
12.04.2013 19:58
Since, $n> \tau(n)$ and $n> \phi(n)$, we need to consider only two cases. If $\frac{n+\phi(n)}{2}=\tau(n)$, we get $\tau(n) > \frac{n}{2}$, giving the only solutions $n=4$ and $n=6$. Then we must have $\frac{n+ \tau(n)}{2} = \phi(n) \Longrightarrow \phi(n) > \frac{n}{2}$ which means that $n$ must be odd. Since $\phi(n) \in \mathbb{N}$, $\tau(n)$ and $n$ must have same parity. Therefore $\tau(n)$ is odd which means $n$ is a perfect square. Let $p^m|n$ where $p \in \mathbb{P}$. Then $p^{m-1}|\phi(n) \Longrightarrow p^{m-1}|n+ \tau(n) \Longrightarrow p^{m-1}|\tau(n)$ and also since $n$ is square, $m>1$. So if $n= \prod_{i=1}^k {p_i}^{\alpha_i}$, then $n= \prod_{i=1}^k {p_i}^{\alpha_i-1}|\tau(n) \Longrightarrow n= \prod_{i=1}^k {p_i}^{\alpha_i-1} \le \tau(n)= \prod_{i=1}^k (1+ \alpha_i)$. But since $p_i \ge 3$, $p_i^{\alpha_i -1} \ge 3^{\alpha_i -1} \ge (1+\alpha_i)$, equality being attained at $p_i=3$. Therefore, the only prime dividing $n$ is $3$ and $n=3^2=9$. The other obvious solution is $n=1$. So, the only solutions are $n=1,4,6,9$. Please point me out if I have missed any.
04.11.2023 02:57
Case 1: $n=\frac{\varphi(n)+\tau(n)}{2}$ If $n=p\text{ where }p\in\mathbb{P}$ This implies $p=\frac{\varphi(p)+\tau(p)}{2}=\frac{p+1}{2}\Longrightarrow p=1$ which is clearly a contradiction. Thus $n\not\in\mathbb{P}$ Furthermore we have that $2n=\varphi(n)+\tau(n)\le2\sqrt{n}+\varphi(n)\le n+\sqrt{n}\Longrightarrow n^2\le n$ which is only true when $n=1$ So $n=1$ is the only solution in Case 1. Case 2: $\tau(n)=\frac{\varphi(n)+n}{2}$ $n=2$ yields $\tau(2)=\frac{\varphi(2)+2}{2}=\frac{3}{2}$ which is clearly a contradiction. $n=6$ yields $\tau(6)=\frac{\varphi(6)+6}{2}=\frac{6+2}{2}=4$ which is true. Thus $n=6$ is a solution. So from now on assume that $n\not\in\{2,6\}$ Thus we have that $2\sqrt{n}\ge\tau(n)=\frac{\varphi(n)+n}{2}\ge\frac{\sqrt{n}+n}{2}\Longrightarrow 3\sqrt{n}\ge n\Longleftrightarrow 9\ge n$ Manually checking the cases yields $n=1\text{ and }n=4$ to be the only solutions. So $n=1,4\text{ and }6$ are the only solutions in Case 2. Case 3: $\varphi(n)=\frac{\tau(n)+n}{2}$ If $\varphi(n)\le\frac{n}{2}$ then $\frac{\tau(n)+n}{2}=\varphi(n)\le\frac{n}{2}\Longrightarrow\tau(n)\le0$ which is a contradiction, so $\varphi(n)>\frac{n}{2}$ which is true if and only if $n$ is odd. Furthermore $2\varphi(n)=\tau(n)+n\equiv\tau(n)+1\pmod 2$ which forces $\tau(n)\equiv1\pmod 2$ which is only the case when $n$ is a square, so let $n=\prod_{i=1}^{k}p_i^{2\alpha_i}$ Thus the equation is equivalent to $2\prod_{i=1}^{k}p_i^{2\alpha_i-1}(p_i-1)=\prod_{i=1}^{k}p_i^{2\alpha_i}+\prod_{i=1}^{k}(2\alpha_i+1)\equiv0\pmod{\prod_{i=1}^{k}p_i^{2\alpha_i-1}}\Longrightarrow\prod_{i=1}^{k}(2\alpha_i+1)\equiv0\pmod{\prod_{i=1}^{k}p_i^{2\alpha_i-1}}$ Thus $\prod_{i=1}^{k}2\alpha_i+1\ge\prod_{i=1}^{k}p_i^{2\alpha_i-1}$ however $p_i^{2\alpha_i-1}\ge3^{2\alpha_i-1}\ge2\alpha_i+1$ so we must have equality which only occurs at $p_i=3\text{ and }\alpha_i=1$ So $n=3^2=9$ is the only solution in Case 3. In conclusion $\boxed{n=1,4,6\text{ and }9}$ are the only solutions in positive integers $\blacksquare$.