# Similar to Fermat’s Last Theorem

Let $n$ be a positive integer. Prove that there exist distinct positive integers $x, y, z$ such that $x^{n-1} + y^n = z^{n+1}.$ (Source: 1997 IMO Shortlist N6)

The equation $x^{n}+y^n=z^n$ is known to have no nontrivial solutions for $n\ge 3$ due to Fermat’s Last Theorem (if you’ve not read Fermat’s Enigma I highly recommend checking it out). This very similar looking equation, however, has an infinite number of solutions. In this blog post, we’ll examine how this difficult looking problem can be solved with one simple observation: $1+8=9$.

For a concrete example of this, consider the case $n=3$ giving the equation $x^{2}+y^{3}=z^{4}.$ Assume we multiply the equation by a number of the form $2^{\alpha}\cdot 3^{\beta}$.  We then will have: $2^{\alpha}\cdot 3^{\beta}+2^{\alpha+3}\cdot 3^{\beta}=2^{\alpha}\cdot 3^{\beta+2}.$ Since we want the first part to be a perfect square, we should have $2\mid \alpha$ and $2\mid \beta$. Since the second part should be a perfect cube, we should have $3\mid (\alpha+3)$ and $3\mid \beta$. Finally, since the last part should be a perfect fourth power, $4\mid \alpha$ and $4\mid (\beta+2)$. Solving these system of linear congruences gives $\alpha=0$ and $\beta=6$! We get back the equation $3^6+3^6\cdot 2^3=3^8$, from which we read off the solution $(x,y,z)=(3^3, 3^2\cdot 2, 3^2)=(27, 18, 9)$

We now attempt to generalize this technique. We begin by multiplying $1+8=9$ by $2^{\alpha}\cdot 3^{\beta}$ again to obtain $2^{\alpha}\cdot 3^{\beta}+2^{\alpha+3}\cdot 3^{\beta}=2^{\alpha}\cdot 3^{\beta+2}.$ We then want the exponents on the leftmost term to be divisible by $n$, on the middle term to be divisible by $n+1$, and on the rightmost term to be divisible by $n+2$. This is equivalent to:

$\begin{cases} \alpha&\equiv 0\pmod{n} \\ \alpha&\equiv -3\pmod{n+1} \\ \alpha&\equiv 0\pmod{n+2} \end{cases}$   and    $\begin{cases} \beta&\equiv 0\pmod{n} \\ \beta&\equiv 0\pmod{n+1} \\ \beta&\equiv -2\pmod{n+2}. \end{cases}$

Notice that in the first case, the first and third conditions are equivalent to $\alpha\equiv 0\pmod{n(n+2)}$. Since $\gcd(n, n+2)=\gcd(n+1, n+2)=1$, we can use the Chinese Remainder Theorem to know that $\alpha$ has a unique solution mod $\text{lcm}(n, n+1, n+2)$

On the other hand, for $\beta$, in the case that $n$ is even, $\gcd(n, n+2)=2$, therefore, we have to use an extended version of the Chinese Remainder Theorem. Thankfully, since $\gcd(n, n+2)=2$ in this case and $0\equiv -2\pmod{2}$, we are still guaranteed a unique solution for $\beta$ mod $\text{lcm}(n, n+1, n+2)$.

Substituting these solutions in for $\alpha$ and $\beta$ gives a solution $(x,y,z)$ to the original equation. Once we have the congruences for $\alpha$ and $\beta$, we can then find an infinite parameterized version of solutions for $(x,y,z)$.

For instance, in the case of $n=3$ above, we had $\alpha\equiv 0\pmod{12}, \beta\equiv 6\pmod{12}$. If we in general write $\alpha=12\alpha'$ and $\beta=12\beta'+6$, we then find

$2^{12\alpha'}\cdot 3^{12\beta'+6}+2^{12\alpha'+3}\cdot 3^{12\beta'+6}=2^{12\alpha'}\cdot 3^{12\beta'+8}.$

This then translates into $(x,y,z)=(2^{6\alpha'}\cdot 3^{6\beta'+3}, 2^{4\alpha'+1}\cdot 3^{2+4\beta'}, 2^{3\alpha'}\cdot 3^{3\beta'+2})$. Notice for $\alpha'=\beta'=0$, this gives the solution triple $(x,y,z)=(27, 18, 9)$ found above.

It’s pretty interesting to me how when you change one small thing in the formulation of the problem (subtract $1$ from the exponent on $x$ and add $1$ to the exponent of $z$) gives an entirely new problem, where we go from no solutions to an infinite number!