Find all $x,y,z\in \mathbb Z^+$ s.t. $(x+y)^{2022}=(\sqrt{xy})^z$ with $\gcd(z,2022)=1$

Let $x,y,z$ be positive integers, find all $x,y,z$ such that $$(x+y)^{2022}=(\sqrt{xy})^z$$ with $\gcd (z,2022)=1$.

This is a math olympiad problem, here is the link if you want to check it out.

This is my attempt

$$(x+y)^{2022}=(\sqrt{xy})^z \implies (x+y)^{4044}=(xy)^z.$$ since $(x+y)^a\equiv x^a+y^a\pmod{xy}$, we get $$x^{4044}+y^{4044}\equiv 0 \pmod{xy}$$

I don't know what to do after this.


Solution 1:

Don't forget the parentheses; the given relation is equivalent to $$(x+y)^{4044}=(xy)^z.$$

Now because $z$ is coprime to $2022$, it is coprime to $4044$, and so $xy=w^{4044}$ for some positive integer $w$. Of course then we have $x+y=w^z$. In particular, since $(x+y)^2>xy$ we see that $z>2022$. Then from the identity $$w^{4044}=xy=x(w^z-x),$$ which we can view as a quadratic equation with integral root $x$, we find that the discriminant $$\Delta=w^{2z}-4w^{4044}=w^{4044}\big((w^{z-2022})^2-4\big),$$ is a perfect square. But then also $$(w^{z-2022})^2-4,$$ is a perfect square, which can only happen if $w=2$ and $z=2023$, corresponding to $x=y=2^{2022}$