For a natural number $m>1$ we'll denote with $f(m)$ the sum of all natural numbers less than $m$, which are also coprime to $m$. Find all natural numbers $n$, such that there exist natural numbers $k$ and $\ell$ which satisfy $f(n^{k})=n^{\ell}$.
Problem
Source: 2007 Bulgarian Autumn Math Competition, Problem 10.3
Tags: number theory, coprime, sum function
19.03.2022 01:04
I claim $n=2,3,4$ are the only solutions. We begin by observing \[ f(m) = \sum_{d\le m-1,(d,m)=1} d = \frac{m\varphi(m)}{2}, \]where $\varphi(\cdot)$ is Euler's totient function. This is a simple consequence of considering $\varphi(m)/2$ pairs of form $(d,m-d)$ where $(d,m)=(m-d,m)=1$ and noticing all such pairs partition $\{1\le d\le m-1:(d,m)=1\}$. With this, we are left with finding all $n$ such that for some $k,\ell$, \[ \varphi\left(n^k\right) = 2n^{\ell-k}. \]For $n=2$, take $(k,\ell)= (2,2)$; for $n=3$, take $(k,\ell)=(1,1)$; and for $n=4$, take $(k,\ell)=(1,1)$. We now show there are no other solutions. Note that if $\ell=k$, then $\varphi(n^k)=2$ which is impossible except the trivial cases above. Hence, assume $\ell\ge k+1$. Next, let $n=\prod_{1\le i\le L}p_i^{e_i}$, where $p_1<\cdots<p_L$ are primes. We then have \[ p_1^{e_1 k -1}p_2^{e_2k-1}\cdots p_L^{e_L k-1}(p_1-1)\cdots (p_L-1) = 2p_1^{e_1(\ell-k)}\cdots p_L^{e_L(\ell-k)}. \]Now, suppose $L\ge 2$. The power of $p_L$ dividing both sides must be equal. Hence, $e_L k -1 = e_L(\ell-k)$. This, however, is impossible by considering modulo $e_L$. Now, let $L=1$ to have \[ p^{ek-1}(p-1) = 2p^{e(\ell-k)}. \]If $p\ne 2$, then comparing the power of $p$ both sides and taking modulo $e$, we obtain a contradiction. Hence, $p=2$. In this case, we have $ek - 1= e(\ell-k)+1\iff e(2k-\ell)=2$. Hence, $e\in\{1,2\}$ thus $n\in\{2,4\}$, both of which were addressed above.
31.03.2022 09:44
grupyorum wrote: ...This, however, is impossible by considering modulo $e_L$... This is incorrect. $e_L=1$ is possible. I'll perform a bit of surgery :p grupyorum wrote: We begin by observing \[ f(m) = \sum_{d\le m-1,(d,m)=1} d = \frac{m\varphi(m)}{2}, \]where $\varphi(\cdot)$ is Euler's totient function. This is a simple consequence of considering $\varphi(m)/2$ pairs of form $(d,m-d)$ where $(d,m)=(m-d,m)=1$ and noticing all such pairs partition $\{1\le d\le m-1:(d,m)=1\}$. With this, we are left with finding all $n$ such that for some $k,\ell$, \[ \varphi\left(n^k\right) = 2n^{\ell-k}. \] Note that $n=2,3,4,6$ are solutions, with pairs $(k,\ell)=(2,2),(1,1),(1,1),(1,1)$ respectively. Assume there exists another solution $n$, and let grupyorum wrote: $n=\prod_{1\le i\le L}p_i^{e_i}$, where $p_1<\cdots<p_L$ are primes. We then have \[ p_1^{e_1 k -1}p_2^{e_2k-1}\cdots p_L^{e_L k-1}(p_1-1)\cdots (p_L-1) = 2p_1^{e_1(\ell-k)}\cdots p_L^{e_L(\ell-k)}. \]The power of $p_L$ dividing both sides must be equal. Hence, $e_L k -1 = e_L(\ell-k)$. Then $e_L(2k-\ell)=1$ and we must have $e_L=2k-\ell=1\Rightarrow \ell-k=k-1$. If $n$ is odd, the power of two dividing the RHS is $2^1$ but the power of $2$ dividing the LHS is at least $2^L$ since all of $(p_1-1),(p_2-1),\dots,(p_L-1)$ are even, so $L=1$, $e_1=e_L=1$ and so $$p_1^{k-1}(p_1-1)=2p_1^{k-1}$$$$\Rightarrow p_1=3$$which leads to $n=3$ that we have covered already. So $n$ is even and $p_1=2$. Then the power of 2 dividing the RHS is $2^{e_1(k-1)+1}$ and the power of 2 dividing the LHS is at least $2^{(e_1 k-1)+(L-1)}$ so $$e_1 k +L-2\le e_1(k-1)+1$$$$\Rightarrow L+e_1\le 3$$$$\Rightarrow (L,e_1)\in\{(1,1),(1,2),(2,1)\}$$ The first two cases lead to $n=2,4$ directly, which we have covered. The last case gives (coupled with $e_2=e_L=1$) $$2^{k-1}p_2^{k-1}(p_2-1)=2\cdot 2^{k-1}p_2^{k-1}$$$$\Rightarrow p_2=3$$which gives $n=6$, and there are no new solutions.