# Curious number theory problem

$k,m,n\in\mathbb{N}$ satisfy $k^{m+n}=nm^n$. How can I show that $m=k$ and $n=k^k\,?$

• you mean $m=k$ and $n=k^m$ – Jonas Kgomo Apr 17 '14 at 13:17
• @Jonas12 That's exactly the same statement. – anaconda Apr 17 '14 at 13:19
• $m=k\implies k^k=k^m=m^m$ i think the best version is $k^m$ which is evident in the OP $k^mk^n=nm^n$ – Jonas Kgomo Apr 17 '14 at 13:21
• @Jonas12 I can see that, but I don't see your point. Re-labeling doesn't magically make the problem easier – anaconda Apr 17 '14 at 13:24

Let $g=\gcd(n,m)$, so that $n=gn_1$ and $m=gm_1$ with $\gcd(n_1,m_1)=1$. Then $$k^{m+n} = g^{m+1}n_1m_1^n.$$ There are two cases. First, assume $\gcd(g,n_1)=1$, so $n_1=n_2^{m+n}$. Write $k=n_2k_1$. Now \begin{align} (n_2k_1)^{m+n} &= g^{m+1}n_2^{m+n}m_1^n \\ k_1^{m+n} &= g^{m+1}m_1^n. \end{align} If $\gcd(g,m_1)=1$, then $m+1=m+n$ and $n=m+n$, so $(m,n)=(0,1)$, contradicting $m \in \mathbb{N}$. Hence $h=\gcd(g,m_1)>1$, so $g=hg_1$ and $m_1=hm_2$.