The diophantine equation $a^{a+2b}=b^{b+2a}$ While working on the recent inequality question 
$\qquad$Find the $least$ number $N$ such that $N=a^{a+2b} = b^{b+2a}, a \neq b$.
posted by Nirbhay, I decided to fool with the associated diophantine equation, and I did manage to solve it. Here is the problem, offered as a fun challenge:
Prove that the only positive integer pairs $(a,b)$ with $a<b$ which satisfy the equation
$$\large{a^{a+2b}=b^{b+2a}}$$ 
are $(a,b) = (16,32)$ and $(a,b) = (16,64)$.
 A: Interesting equation. We can solve it using the following fact:
Lemma: Let $a, b, n$ be positive integers. If $a^n\mid b^n$, then $a\mid b$.
This results follows inmediately from the fundamental theorem of the Arithmetic.
Since $a<b$ we have $b+2a<a+2b$, so $a^{b+2a}\mid a^{a+2b}=b^{b+2a}$, then for the above lemma we deduce that $a\mid b$. Let's write $b=ak$, where $k$ is a positive integer greater than $1$. Replacing $b=ak$ into the equation gives us $$a^{a(2k+1)}=a^{a(k+2)}k^{a(k+2)}$$ $$\implies a^{k-1}=k^{k+2}.$$
Now, since $k^{k-1}\mid k^{k+2}=a^{k-1}$, we obtain, by the lemma again, that $k\mid a$. So let's write $a=kn$, where $n$ is a positive integer. Replacing $a=kn$ gives us $$k^{k-1}n^{k-1}=k^{k+2}$$ $$\implies n^{k-1}=k^3.$$
The last equation can be solved using inequalities which can be proved by induction. Namely, if $n\ge 9$, $n^{k-1}\ge 9^{k-1}>k^3$ for all $k\ge 2$. Therefore $n\le 8$.
If $n=8$, $8^{k-1}>k^3$ for every $k\ge 3$. If $k=2$ we get an equality, and this gives us $a=16$ and $b=32$.
A similar reasoning gives us no solutions for every $n\le 7$, except for $n=4$, where we find $k=4$, and thus $a=16$ and $b=64$. Hence, all the solutions are $(a,b)=(16, 32)$ and $(a, b)=(16, 64)$ as you stated.
