40

It's fairly well known that Fermat's last theorem fails in $\mathbb{Z}/p\mathbb{Z}$. Schur discovered this while he was trying to prove the conjecture on $\mathbb{N}$, and the proof is an application of one of his results in Ramsey theory, now known as Schur's theorem.

I'm wondering whether there are any other places (let's say, unique factorisation domains) where the statement is known to be false?

S.C.B.
  • 23,156
  • 13
    Solutions of $A^k + B^k = C^k$ in $n \times n$ integral matrices, American Mathematical Monthly, 75, 1968, 759-760. – Ethan Bolker Mar 26 '16 at 01:39
  • What does $\mathbb{Z}/p\mathbb{Z}$ mean? – S.C.B. Mar 26 '16 at 01:59
  • 3
    @MXYMXY: the set of integers modulo $p$, or the set of congruence classes of same... It might be read "the integers modulo the ideal $p$ times the integers", or something like that – abiessu Mar 26 '16 at 02:02
  • @MXYMXY, for example, $\mathbb{Z}/3\mathbb{Z} = {0, 1, 2}$. –  Mar 26 '16 at 02:57
  • 3
    Related : http://math.stackexchange.com/questions/697685/fermats-last-theorem-fails-in-mathbbz-p-for-p-sufficiently-large?rq=1 – Watson Mar 26 '16 at 09:42
  • 4
    in the $p$-adic units Fermat fails for about 1/6-th of the primes. Also see this question here – ArtW Jun 20 '16 at 20:39
  • 4
    For any $x,y,n$, it fails in the ring of integers of ${\bf Q}(\root n\of{x^n+y^n})$. Whether that ring is ever a UFD for $n\ge3$, I do not know. – Gerry Myerson May 13 '19 at 05:26

2 Answers2

21

$$(18+17\sqrt2)^3+(18-17\sqrt2)^3=42^3$$ so Fermat fails for $n=3$ in the UFD ${\bf Q}(\sqrt2)$. $$(1+\sqrt{-7})^4+(1-\sqrt{-7})^4=2^4$$ so Fermat fails for $n=4$ in the UFD ${\bf Q}(\sqrt{-7})$.

Looking at a couple more of the imaginary quadratic UFDs:

$(1+\sqrt{-2})^{\color{blue}{3}}+(\sqrt{-2})^{\color{blue}{3}}=(1-\sqrt{-2})^{\color{blue}{3}}$ (failure in ${\bf Q}(\sqrt{-2})$)

$(1+\sqrt{-3})^{\color{blue}{6n+1}}+(1-\sqrt{-3})^{\color{blue}{6n+1}}=2^{\color{blue}{6n+1}}$ (any whole number $n$ at all; failure in ${\bf Q}(\sqrt{-3})$)

Oscar Lanzi
  • 51,942
Gerry Myerson
  • 188,081
  • 3
    Also for ${\bf Q}(\sqrt2)$ we have $(707472 + 276119\sqrt2)^3 + (707472 - 276119\sqrt2)^3 = 1106700^3$ – Josh B. May 13 '19 at 16:02
  • 1
    You may be interested in this post. It seems FLT's $x^3+y^3=z^3$ fails over ${\bf Q} (\sqrt n)$ for a lot of $n$. – Tito Piezas III Jan 07 '24 at 03:16
  • So basically, this theorem paves the way for yet another proof that the square roots of 2 are irrational. – Michael Ejercito Feb 29 '24 at 02:14
  • 4
    @Michael, yes, people have noticed this before. But the catch is that to assure yourself that you are not engaging in circular reasoning, first you have to go through the proof of Fermat to make sure it doesn't assume the irrationality of $\sqrt2$. – Gerry Myerson Feb 29 '24 at 02:46
  • Examples of $a^3+b^3=c^3$ I found with a script ($a=a_0+a_1\cdot d$, $b=b_0+b_1\cdot d$, $c=c_0+c_1\cdot d$ with bound $0<a_i,b_i,c_i<30$; there are examples for $d^2\in\left{ -2,5,6,33,93\right} $) so far happen to be all equivalent to solutions in the form $\left(u+v\cdot d\right)^n+\left(u-v\cdot d\right)^n=c^n$. E.g. $d=\sqrt{6}$, $\left(3+7\cdot d\right)^3+\left(36+9\cdot d\right)^3=\left(27+13\cdot d\right)^3$ is equivalent to ${18}^3=\left(6+5\cdot d\right)^3+\left(6-5\cdot d\right)^3$. I do not know if there are other solutions not covered by this form. Now running with bound 50. – mezzoctane Dec 08 '25 at 14:53
  • 1
    @mezzo, what do you mean by "equivalent"? – Gerry Myerson Dec 08 '25 at 21:36
  • 1
    I meant one can multiply each of $a$, $b$, $c$ by the same constant and/or move terms between the LHS and the RHS to get an equation of the form $\left(u+v\cdot d\right)^n+\left(u-v\cdot d\right)^n=c^3$. In the example $a=3+7\cdot\sqrt{6}$, $b=36+9\cdot\sqrt{6}$, $c=27+13\cdot\sqrt{6}$ one can multiply $a$, $b$, $c$ by $\frac{1}{5}\cdot\left(4-\sqrt{6}\right)$ resulting in the triple $\left(-6+5\cdot\sqrt{6}\right)^3+{18}^3=\left(6+5\cdot\sqrt{6}\right)^3$, and moving the first term to the right gives ${18}^3=\left(6+5\cdot\sqrt{6}\right)^3+\left(6-5\cdot\sqrt{6}\right)^3$. – mezzoctane Dec 08 '25 at 21:49
  • Search with bound 50 ended without detecting counterexamples; asked in chat if this is already known. – mezzoctane Dec 09 '25 at 11:19
5

You can also blow FLT out of the water in $p$-adics. Consider the ordinary Pythagorean triple

$17^2+144^2=145^2$

Render these arguments in $2$-adics: $17$ and $145$ are each one greater than a multiple of $8$, thus squares of other $2$-adic integers which I shall call $\pm m$ and $\pm n$ respectively (an additive inverse pair of choices for each). And of course $144$ is the square of $\pm 12$. So then we have eight $2$-adic equations (four of them "linearly independent") of the form

$(\pm m)^{\color{blue}{4}}+(\pm 12)^{\color{blue}{4}}=(\pm n)^{\color{blue}{4}}$

Oscar Lanzi
  • 51,942
  • A comment by @ArtW on the original question suggests wholesale $p$-adic Fermat violations, and links to a discussion thereof. – Gerry Myerson May 13 '19 at 22:23
  • 1
    I saw that, and looked at the earlier question. Turns out there are solutions even for "bad" prime bases. For instance, the method above applies to $3^2+4^2=5^2$ in $59$-adics, where $3$ and $5$ both turn out to have square roots. – Oscar Lanzi May 13 '19 at 23:21