# When does $a^b\mid b^a$

Let $a,b >1$ be integers. When does $a^b \mid b^a$?

Certainly if this is true then $a\mid b$ by considering $a$'s prime factors. (not quite convinced). Also then if $b$ is prime then $a=b$.

There the well know solution to the problem $x^y=y^x$, which tells that $2^4=4^2$ is the only solution given the conditions.

I've a feeling this might be the only other case.

• We can find solutions by letting $a$ and $b$ be suitable powers of $p$. There is lots of slack. – André Nicolas Apr 18 '16 at 1:05
• Look at the prime factors of a and b. – marty cohen Apr 18 '16 at 1:15
• @AndréNicolas nice hint. So would any powers of primes do? If I took $a=p^m$ and $b=p^n$, then if $a\neq b$ and $p \neq 2$, then either $a^b \mid b^a$ or $b^a \mid a^b$? Just by considering which is bigger. – snulty Apr 18 '16 at 1:42
• @snulty: Yes, and $2$ is barely an exception, we know the only case of equality when $m\ne n$. – André Nicolas Apr 18 '16 at 1:46