Finding the solution of: $5^m -m^n=mn$ I want to find all solutions to:
$5^m -m^n=mn \tag*{}$
Where $(m,n) \in \mathbb{N}$
I rearranged and got:
$5^m= m^n + mn \tag{1}$
Taking$\bmod 5$ on both sides I got:
$5|m \text{ or } 5|m^{n-1}+n\tag*{}$
I am having a problem with how to proceed from here. Any help would be appreciated. Thanks.
EDIT $1$:
I tried to find the parity of $(m,n)$. Taking$\bmod 2$ in $(1)$. We get:
$1 = m^n + mn \bmod 2 \tag*{}$
Note that if $m$ is even, it doesn't satisfy the equation above, and if $m$ is odd and $n$ is odd too doesn't satisfy so $\boxed{\text{m is odd and n is even}}$
 A: *

*As noted in the comments by @Cheerful Parsnip, $m$ itself must be a power of $5$, indeed $m=5^c$. [Indeed: As rearranging yields $$5^m = mn+m^n,$$ the only way this could be satisfied is if $m$ divides $5^m$, which implies that the only prime dividing $m$ is $5$ [or that $m=1$].]


*Thus, for any $n$ and $m$ that are solutions, $m$ must be a power of $5$ so writing $m=5^c$, the following equation holds:
$$5^{5^c}-5^{cn} = n 5^c.$$


*Now for every positive integer $M$, let us write $\nu_5(M)$ the largest power of $5$ that divides $M$. Then for any $(m,n)$ that are solutions,
$$\nu_5(5^{5^c}-5^{cn}) = \nu_5(n5^c), $$ where $m=5^c$.


*As $5^{5^c}-5^{cn}$ is a positive integer, it follows that the strict unequality $5^{5^c}>5^{cn}$ holds, and thus $5^{5^c}$ is a larger power of $5$ than $5^{cn}$ is, and thus
$$\nu_5(5^{5^c}-5^{cn})= \nu_5(5^{cn})$$ $$=\nu_5(n5^c).$$


*Now, $\mu_5(5^{cn}) =cn$, whereas $\nu_5(n5^c)=\nu_5(n)+c.$ Plugging these in yields
$$cn = \nu_5(n)+c.$$


*This has no solutions for integers $c >0$ and $n>1$ however. [Indeed, the strict inequality $\nu_5(M) <\log_4(M) \le M-1$ for $M>1$ holds; indeed $5^{\log_4(M)} > 4^{\log_4(M)} = M$. So fpr such $n$ and $c$ the string of inequalities $\nu_5(n)+c < n-1+c < cn$ holds, and thus the equation $cn=\nu_5(n)+c$ indeed cannot hold for any integers $c>0$ and $n>1$.] So for the equation in 5. to hold for some $c>0$, the integer $n$ must be $1$. For $n=1$ however, the equation $5^m=m+m=2m$, which cannot hold for any positive $m$. So indeed, if the original Diophantine equation has solutions, $c$ must be $0$.


*So this leaves, with $m=5^c$, only $c=0$ as a possibility for any solution $(m,n)$. And so $m=1$, and $n$ such that $5-1^n=n$. So the only solutions are $(m,n)=(1,4)$.

ETA: There is another simpler way. First note the following: Let $x$ and $y$ be two nonnegative integers w $y >x$. Then $5^y-5^x \ge 4×5^x$. Thus, note as before that $m$ must be a power of $5$ and thus so must $m^n$, and that $5^m > m^n$, because $5^m-m^n$ is $mn$ a positive integer. Then if $m$ and $n$ are solutions, then $$5^m-m^n = nm \ge 4m^n,$$ so $m$ must be $1$. Then finish as in 7. above.
