Fermat's theorem, its riddle, and the endless search for solutions occupy a unique position in mathematics in many respects. Despite the fact that a simple and elegant solution was never found, this task was the impetus for a number of discoveries in the field of set theory and primes. The search for an answer turned into an exciting process of competition between the leading mathematical schools of the world, and also revealed a huge number of self-taught students with original approaches to certain mathematical problems.

Pierre Fermat himself was a striking example of just such self-taught. He left behind a whole series of interesting hypotheses and proofs, not only in mathematics, but also, for example, in physics. However, he became known in many respects thanks to a small field entry of the then popular “Arithmetic” of the ancient Greek researcher Diophantus. This record stated that after much deliberation he found a simple and "truly wonderful" proof of his theorem. This theorem, which went down in history as “Fermat's Big Theorem,” claimed that the expression x ^ n + y ^ n = z ^ n cannot be solved if the value of n is greater than two.
Pierre Fermat himself, in spite of the explanation left in the margins, left no general solution for himself, but many who took up the proof of this theorem found themselves powerless before it. Many tried to build on the evidence of this postulate found by Fermat himself for a special case when n is 4, but for other options it turned out to be unsuitable.
Leonard Euler managed to prove Fermat's theorem for n = 3 at the cost of enormous efforts, after which he was forced to abandon the search, considering them futile. Over time, when new methods for finding infinite sets were introduced into scientific use, this theorem found its proof for the range of numbers from 3 to 200, but it still failed to solve it in general form.
Fermat's theorem received a new impetus at the beginning of the twentieth century, when a prize of one hundred thousand marks was announced to those who find its solution. The search for a solution for some time turned into a real competition in which not only venerable scientists but ordinary citizens participated: Fermat's theorem, the formulation of which did not imply any double interpretation, gradually became no less famous than the Pythagorean theorem, from which, by the way she once came out.
With the advent of first arithmometers, and then powerful electronic computers, it was possible to find proofs of this theorem for an infinitely large value of n, but in general terms it was still not possible to find a proof. However, no one could refute this theorem either. Over time, interest in finding an answer to this riddle began to subside. This was largely due to the fact that further evidence was already at a theoretical level that is beyond the power of the average layman.
A kind of end to an interesting scientific attraction called “Fermat's theorem” was the research of E. Wiles, which to date is accepted as the final proof of this hypothesis. If there remained doubters about the correctness of the proof itself, then everyone agrees with the fidelity of the theorem.
Despite the fact that Fermat’s theorem did not receive any “elegant” proof, its searches made a significant contribution to many areas of mathematics, significantly expanding the cognitive horizons of mankind.