# About the diophantine equation $(x-y)^{xy}=x^y\cdot y^x$

A few days ago I was checking out some old diophantine equations that I solved some year ago and I found the equation $$(x-y)^{xy}=x^y\cdot y^x$$ where $x$ and $y$ are positive integers such that $x>y$.

I decided to check my solution and it seems that it is wrong. This is what I did: it's easy to see that both $x$ and $y$ have to even. Now, set $d=\gcd(x,y)$ so we can write $x=da$ and $y=db$ for some coprime integers $a$ and $b$, moreover it's clear that $d$ is even. Replacing we get $$d^{xy}(a-b)^{xy}=d^{x+y}a^yb^x.$$

As $x\ge 4$ and $y\ge 2$ we have $ab>a+b$, then $d^{xy-x-y}\mid a^yb^x$ and from this we get that $d\mid a^yb^x$. Here is where I deduced that $d\mid a^y$ or $d\mid b^x$, but this is not in general true (e.g. $6\mid 2^3\cdot 3^2$ but neither $6\mid 2^3$ nor $6\mid 3^2$ even when $\gcd(2,3)=1$). The rest of my solution depends on the analysis of the cases $d\mid a^y$ and $d\mid b^x$ so the above idea is crucial. By the way, the only solution seems to be the pair $(x,y)=(4,2)$.

I think my above deduction is wrong (or maybe is correct for some extra assumptions that I can't see). I try to use other approaches but I go nowhere, so how can be solved the above diophantine equation? Any ideas/hints or solutions are welcome. Thanks in advance.

You've got to $d^{xy-x-y}(a-b)^{xy} = a^yb^x$

Let $p$ prime such that $p|(a-b)$. Then $p|a^yb^x$ therefore $p|a$ or $p|b$. If $p|b$ then $p|(a-b)+b=a$ false because $a,b$ are coprime. Similar for $p|a$. It follows that $a-b=1$ and $d^{xy-x-y}=a^yb^x \tag 1$

Now let $p$ prime such that $p|a$. From (1) $p^y|d^{xy-x-y}$ we get $\rlap{\textbf{-------------------}} {y=c(xy -x-y)} \tag 2$ for some positive integer $c$. But $xy -x-y \gt y$ for $x \gt 4, y \ge 2$, therefore $x=4$ and $c=1$. From (2) we get $y=2$

UPDATE

It seems that (2) is not quite right. Suppose $a=p^ka_1$ where $p,a_1$ coprime. From (1) we know $p|d$ so let $d=p^cd_1$ where $p,d_1$ coprime. Because $p,b$ coprime, from (1) we have $c(xy-x-y)=ky \tag 3$ I cannot go further with (3)

• Thanks for your answer. I was more focused in my mistake that I didn't think about how to prove that $a-b=1$. Just one thing, how do you conclude that $y=c(xy-x-y)$?
– Xam
Mar 19, 2017 at 1:20
• @Xam I'll try to explain it since I found it confusing too. Since $a$ and $b$ are co-prime, both $a^y$ and $b^x$ must have exponents which are a multiple of $xy-x-y$, which is what he' saying. It's a simple generalisation of a more common case you may have seen, if $n^2=pq$ and $p,q$ are co-prime, then $p$ and $q$ are both square numbers. Mar 19, 2017 at 1:43
• @Cataline your idea is correct, but what about $p$? I think we don't need to use it, don't we? since we can directly conclude that $y$ is a multiple of $xy-x-y$, right?
– Xam
Mar 19, 2017 at 1:50
• @Xam Yeah, perhaps they forgot that $a$ and $b$ are co-prime, I feel their way of doing it is a bit strange and not very clear. Mar 19, 2017 at 2:00