News for hackers. Stuff that matters.

Ask HN: Fermat's Last Theorem with More Terms: Why Does It Stop at 3?

Everybody knows the Pythagorean theorem (a^2 + b^2 = c^2). And everybody knows of integer solutions like 3^2 + 4^2 = 5^2.

And most people know of Fermat's Last Theorem, which says that there no integer solutions for powers higher than two.

But that's not true if you allow more than two terms. You still have solutions with squares, such as 3^2 + 4^2 + 12^2 = 13^2. And you get solutions for cubes as well, such as the surprising 3^3 + 4^3 + 5^3 = 6^3.

But you get no such solutions for the fourth power, either with three or four terms. (At least, you get no solutions for small integers, which I have checked via exhaustive search.)

Why? Can anyone explain why that should be?

(I know that you can get a trivial solution with 16 terms, each one 1^4, all added together to give 2^4. I am ignoring such trivial solutions, though I don't know of a good way to state a rigorous exclusion condition.)

( 5 comments | on HN )
Re:Ask HN: Fermat's Last Theorem with More Terms: Why Does I... by db48x on Saturday October 07, 2023 @08:03PM (#37806648)
It's an open question that has been studied for thousands of years. This type of equation (a polynomial with integer coefficients) is called a Diophantine equation; you can look it up on Wikipedia.

Or watch videos about it:

https://www.youtube.com/watch?v=wymmCdLdPvM&list=PLt5AfwLFPx...

Re:Ask HN: Fermat's Last Theorem with More Terms: Why Does I... by sajid on Saturday October 07, 2023 @08:05PM (#37806659)
95800^4 + 217519^4 + 414560^4 = 422481^4
Re:Ask HN: Fermat's Last Theorem with More Terms: Why Does I... by AnimalMuppet on Saturday October 07, 2023 @08:20PM (#37806750)
Wow. How did you find that?
Re:Ask HN: Fermat's Last Theorem with More Terms: Why Does I... by pestatije on Saturday October 07, 2023 @08:24PM (#37806773)
you said:

> which I have checked via exhaustive search

how far did you go checking?

Re:Ask HN: Fermat's Last Theorem with More Terms: Why Does I... by AnimalMuppet on Saturday October 07, 2023 @08:59PM (#37806918)
Well, I was checking on a very old, underpowered desktop, so I tried to keep it under a billion combinations, so upper limit of 1000 on a, b, and c.