# “Last Fermat's Theorem” modulo m

The last Fermat's Theorem is a claim about the non-existence of non-trivial integer solution for $X^n+Y^n=Z^n$ for $n\in \mathbb N$, $n\ge 3$.

However, given $m\in \mathbb N$, we can investigate the integer solutions for $X^n+Y^n\equiv Z^n \mod m$ for all $n\in \mathbb N$ with the restriciton that $X,Y,Z\not\equiv0\mod m$.

It seems to me that we always have solutions in this case, but I did no find any reference or exposition about this.

Is it "relevant" to think on it? Have this question appeared elsewhere?

• Just as an initial comment, I would observe that it's immediately trivially true unless we restrict $X, Y, Z \not\equiv 0 \pmod{m}$. – Brian Tung Nov 5 '15 at 23:10
• Sure, I will include this note! It is "analogous" to the condition of the Theorem... – Binai Nov 5 '15 at 23:16
• It works if you take $X=1$, $Y=1$, $Z=2$, and $n = \lambda(m)+1$, where $\lambda$ is the Carmichael function. Maybe it is more interesting to require $n \le \lambda(m)$? – Dan Brumleve Nov 5 '15 at 23:24
• Why? How do you eliminate the case where $n>\lambda(m)$? – Binai Nov 5 '15 at 23:30
• $X^{\lambda(m)+1} \equiv X \pmod{m}$. Since we always have solutions for $n=1$ we have solutions for $n=\lambda(m)+1$ too. – Dan Brumleve Nov 5 '15 at 23:42

## 2 Answers

You are correct. For sufficiently large primes $p$ and any $n \geq 1$, there are always nontrivial solutions to $$X^n + Y^n \equiv Z^n \pmod p.$$ Schur first proved this in 1916, in his paper --- Schur, I. "Über die Kongruenz x^m+y^m=z^m (mod p)." Jahresber. Deutsche Math.-Verein. 25, 114-116, 1916.

You might think it meta-wise clear that there are solutions mod $p$ for every $p$, as otherwise the problem wouldn't really be so hard. [Or perhaps you might think it's very hard to find a $p$ for which there are no solutions, and that was the bottleneck.]

• May I ask what means: "meta-wise clear" and "bottleneck"? ...English s not my native language. – Binai Nov 6 '15 at 1:45
• @Lucci Of course! When you pour water out of a bottle, the water doesn't all rush out all at once. Instead, it comes out unevenly through the little opening, which we call a "bottleneck." So here, I use bottleneck as a metaphor for the part of the process that slows things down. "Meta-wise clear" is more complicated to explain. The term "meta" is a bit ill-defined, but here I use it to mean that you might guess that this problem is difficult not based on any part of the problem itself, but because of others' lack of progress. To identify aspects about the problem indirectly is sort of "meta." – davidlowryduda Nov 6 '15 at 1:59
• Thank you! Math+General culture =) – Binai Nov 6 '15 at 2:08

As mixedmath says, this is true for sufficiently large prime $m$. This result is due to Schur. See this blog post for an exposition.