It was at age 10 when Christian Hesse became fascinated by Pythagoras and the Pythagoreans, a group of scientists that enjoyed doing mathematics. This is where the following story starts. It is in the book Chess Stories that Frederic Friedel and Christian Hesse published in November 2024 (ISBN 978-81-959245-4-7). Here is a summary of that story and the Fermat Problem in Chess:
The Chessboard and the Margin: A Meditation on Fermat
There are stories that begin not with thunder, but in the light of a question—a question that stretches out its hand over many centuries. This is one such story, and its echo is heard wherever curiosity dares to wander.
Picture, if you will, the quiet prodigy of antiquity—Pythagoras of Samos, contemplating away his days among the elegant mysteries of triangles and harmony. He finds a relation so simple and so deep, it gleams undefiled on the surface of the world: the sum of two squares, measured on the arms of a right triangle, becomes the square upon its hypotenuse. The equation for an ideal seems to follow the very order of nature.
x2 + y2 = z2
The simplest solution in integers is:
32 + 42 = 52
Yet, as time drifts onward, the pattern grows ever more intricate. The Pythagorean triad—three, four, five—cascades like pearls upon a string, yet mathematicians are not content. They ask: Can such wholeness, such fitting together of numbers, be found when the sides are raised beyond the gentle second power? Can three numbers, chosen not by whim but by fate, come together in a harmony of cubes, or fourths, or fifths or higher numbers n?
xn + yn = zn
For long centuries, this question kept its secret: For any integer power n larger than 2, are there integers x, y, z satisfying this equation?
It is Diophantus, the mathematician of Alexandria, who first counts this puzzle among the world’s riddles. And it is Pierre de Fermat, lawyer and midnight mathematician, who, in the narrow gloom of a book’s margin, dares the ages and states the impossibility of such solutions: “I have a truly marvellous proof for this, but this margin is too small to contain it.” Thus a legend is launched. When Fermat’s quiet voice gives way to the silence of death, the scrap of his remark remains behind—a message to future genius, an invitation to the impossible.
From Margin to Mandala: The Theorem That Would Not Yield
So the hunt begins, winding its way through the labyrinth of ages. The brightest minds strike flint against stone, hoping for the spark of proof. Generations turn. The question remains.
Enter Andrew Wiles, a boy haunted by Fermat’s note, contemplating it in the half-light of a provincial library. There is something in the unbroken simplicity of the problem that draws him deeper with every passing year. His life stretches along the winding path from Pythagoras to Fermat to Wiles himself.
Seasons change, decades pass, the boy becomes a mathematician, and the mathematician inherits the margin’s riddle. At one time, it seems solved; then, heartbreak—the discovery of a gap. But Wiles, like all that is patient in nature, returns to his desk with the persistence of dawn, and at the final hour, achieves what generations failed: He has a solution. The last theorem is no longer last: it is proved, resting at last in the glass case of human knowledge.
Between Chess and Cosmos: The Paradox Unfurled
Yet, this is not merely a story of numbers—it is a story of the way minds play, of how pieces on chessboards and margins can become the stage for beauty. So Fermat`s conjecture and Wiles` proof travel into the world of chess.
This is the seemingly impossible problem that Christian Hesse adds to this story. In his own words:
“A Zen master assembles a group of students and says to them: “I heard you have been studying Fermat’s Conjecture in your math class. I recently found a marvellous chess study. The chess pieces are pawns of both colors as well as some officers, i.e. non-pawns. 60 percent of the pieces are black and white pawns. I noticed that if I raise the numbers of black pawns, of black officers, and of white officers each to the power of the total number of bishops on the board, then the sum of the first two numbers is precisely equal to the third.
Student Kaito, who is a mathematical whiz, thinks for a few minutes and then says: “Ahhh, so the study has a total of 20 pieces. Eight are white pawns, four are black pawns, five are white officers and three are black officers.” – “That’s right!” says the Zen master and smiles.”
Kaito`s way of thinking is given at the end. It is the chessboard version of Fermat`s Theorem.
It is Jan Timman who further adds to the magic. Years ago, he had composed a snapshot that is both study and meditation, a crystalline arrangement where each move reflects back the entire philosophical problem. In Jan Timman`s study, mathematics and chess become inseparable: each a mandala, a creation that draws together the pure and the practical, the formal and the fanciful. The study enriches Fermat`s note on the margin, Andrew Wiles`s proof and Christian Hesse`s “Fermat in Chess problem” and makes the margin of a theorem feel as wide as the open sky.
And here is the study the Zen master had in mind, composed by Jan Timman and Karsten Müller filtered it from a large data base of studies.
Kindly, Jan Timman provided comments on his study specifically for this story:
“This study is based on a Gurgenidze study from 1979 which features the same construction with the White king on a1 and the Black rook on b2, protected by a Black bishop. His study comprises 3 queen sacs on h8 to prevent perpetual check, with 2 additional queen sacs on other squares. I believe that Gurgenidze’s study has been underestimated; it is really well constructed. My study comprises 4 queen sacs on h8 with 2 additional rook sacs, both of them to clear the 2 long diagonals. The whole study is in fact a tale of 2 long diagonals: Black is aiming for a perpetual, using the diagonal a1-h8, while White is going to clear the diagonal h1-a8 to deliver the final mate. The study also comprises a surprising knight promotion in one of the side lines. 1. Bf1+ [The bishop check is needed to enable the final mate. White shouldn’t play 1. Rf2+ first, because there is no win after 1…exf2 2. Bf1+ Kxf1]
1… Kg1 2. Rf2!! The first rook sac that is mainly needed to clear the diagonal a1-h8. There is a second purpose, though: White limits the range of the Black rook on the second rank.
2…exf2 [If 2… Rxf2+ 3. Kb1 b3 White wins without too many problems: 4. Bd3 Ra2 5. Kc1 (5. Qxa5 is also winning.) 5… e2 6. Qc5+ Kg2 7. Qe3 and Black’s counterplay has come to a standstill.]
3. Qh8! The first queen sac. 3…e5. [The alternative is 3… Bxh8 Now White has to promote his c-pawn: he has other plans with the e-pawn. The main line goes: 4. c8Q! Bc3 5. Qh8! Bxh8 6. e5 Bxe5 7. Rxe6 Bc3 8. Re3 Bd4 9. Rd3 Bg7 and now 10. e8N! is needed to shut out the Black bishop. After 10… Bh8 11. g5 White can interpose the knight on f6 after a rook check.]
4. Qxe5 Bxe5 5. e8Q Bc3 6. Qh8! The second queen sac. 6…Bxh8 7. c8Q. [This promotion clears the diagonal h2-b8. After 7. b8Q? Bc3 8. Qh8 Bxh8 there is no win.]
7… Bc3 8. Qh8! And the third. 8…Bxh8 9. e5 The pawn sac clears the diagonal h1-a8, while it obstructs the diagonal a1-h8. 9…Bxe5 10. b8Q. Without the pawn on c7 this promotion works, since the Black bishop is under attack. It also clears the long diagonal. 10…Bc3 11. Qh8! The final queen sac. 11…Bxh8 12. Rh6. The final clearance. 12…Bc3 13. Rh1+! The second rook sac. 13…Kxh1 14. a8Q+ Kg1 15. Qg2#. The Black king is mate at the square where it stood in the initial position. 1-0“
Here’s the study where you can click on moves to get a replay board with full engine analysis.
A sensationally beautiful study enriching tremendously the first Fermat Problem in chess.
We leave the final words to Christian Hesse, giving a little afterword to Andrew Wiles and his titanic effort:
“Maybe Fermat had a short proof, maybe he didn’t. It would be a sensation to find it. And it wouldn´t be the first time that a tremendously long and winding proof such as the one by Andrew Wiles was considerably shortened.
My dream is that it could happen again. And that one day one ingenious, say, teenager, that is able to think along the lines and to comparable depths as Fermat, comes up with such a proof that doesn’t quite fit on a books margin but still on a books page. That will be the day that I will take pleasure in studying the book-page-long proof, rather than the existing 200 page-long proof.”
Epilogue:
Here is the solution to Christian Hesse`s “Fermat in Chess” problem in a more detailed fashion:
Solution
Let
x = number of black pawns
y = number of black officers
z = number of white officers
Let us say there are n bishops on the board. Then the number of white officers raised to the number of bishops is zn. Similarly, we have yn and zn. It follows from the information given that
xn + yn = zn
From Pierre de Fermat and Andrew Wiles, we know that there are positive whole numbers x, y and z that satisfy the above equation only in the cases when n = 1 or n = 2. Since there are at least two bishops on the board (since the problem statement talks about bishops rather than a bishop), we can conclude that n is equal to 2 exactly. Therefore, we have obtained the relationship:
x2 + y2 = z2
What are the possible solutions of this equation? From the chess context and the information given, we know that x and y and z must be at least 1. After all, there are at least two kings and pawns of both colours. And x is at most 8. Plus, there are further restrictions because of the chess context. One solution in this range is given by the integers 3, 4 and 5:
32 + 42 = 52
The next larger solutions are
62 + 82 = 102
and
52 + 122 = 132
The latter would be out of bounds already (because there cannot be 5 black pawns and 12 black officers on the board.
Therefore, we know at this point that there are only four possibilities:
Black has 4 pawns and 3 officers or vice versa (and White has 5 officers).
Or:
Black has 6 pawns and 8 officers or vice versa (and White has 10 officers).
To determine exactly which of these is the case, the Zen master`s “60 percent” information comes into play. For example, if there were 3 black pawns and only 1 white pawn, we would have 4 pawns out of 13 chess pieces altogether. That’s not 60 percent. Similarly, one can exclude all the other numbers of pawns, except for 4 black pawns and 8 white pawns. This would then result in 12 pawns out of 20 chess pieces, hence exactly 60 percent. Therefore, the solution is:
There are 2 bishops on the board and the study consists of 8 white pawns, 4 black pawns, 5 white officers and 3 black officers, 20 pieces in total. All of this can be deduced from the simple statement of the Zen master.
Postscriptum
Andrew Wiles (born 1953) is a British mathematician. After academic positions at Harvard and Princeton, Wiles spent several years working on Fermat’s Last Conjecture, a problem unsolved for over 350 years. Wiles’ approach relied on proving the Taniyama-Shimura conjecture for elliptic curves, which was shown to imply Fermat’s Conjecture. Wiles’ proof is regarded as one of the most significant mathematical achievements of the 20th century, inspiring deeper exploration in modern mathematics. For his breakthrough, Wiles received numerous awards including the Abel Prize, the Copley Medal, and a knighthood, solidifying his legacy as one of the world`s preeminent mathematicians.
Christian Hesse (born 1960) is one of Germany`s best known mathematicians specializing in statistical mathematics, who earned his PhD from Harvard and has held professorships in Stuttgart and Berkeley. Hesse is known for his contributions to applied probability, his popular science books such as “Why Mathematics Makes People Happy,” and his roles as an expert advisor to government bodies including the German Bundestag and Constitutional Court on mathematical and data-analytical issues. His works have been translated into more than ten languages, including Mandarin.
The book, Schachgeschichten, from which the above chapter was excerpted, was published in German by Droemer Knauer. The English translation – undertaken by the bilingual authors themselves – was published by ChessBase India.
Frederic Friedel describes his encounters and friendship with World Champions – from Max Euwe to Magnus Carlsen, and includes one he calls a future world champion, Gukesh.
Christian Hesse has created some amazingly deep and entertaining connections between chess and mathematics, spanning the range from the first appearance of Fermat’s last problem in chess to a magic trick on the chessboard based on Fibonacci numbers.
Here’s the announcement report of the English language edition.
Purchase options