An Introduction to Fermats Last Theorem
Fermat claimed to have found a proof of the theorem at an early stage in his career. Much later he spent time and effort proving the cases n=4 and n=5. Had he had a proof to his theorem earlier, there would have been no need for him to study specific cases. It is likely that he found a mistake in his own "proof" before he had a chance to announce the result, and never bothered to erase the marginal comment because it never occurred to him that anyone would see it there.1
Fermat's Last Theorem was not actually an important landmark in the development of mathematics, but has precipitated considerable research of significant impact on number theory and algebraic geometry 2. It was only finally solved by a (mildly) obsessed professor, who had a 'personal struggle' with the problem. There was virtually no money to be gained by its proof, and generated little interest outside the mathematical fraternity.
Fermat may have had the following "proof" in mind when he wrote his famous comment. 1. Fermat discovered and applied the method of infinite descent, which, in particular can be used to prove Fermat's Last Theorem for n=4. This method can actually be used to prove a stronger statement than Fermat's Last Theorem for n=4, viz. x4 + y4 = z2 has no non-trivial integer solutions. It is possible and even likely that he had an incorrect proof of Fermat's Last Theorem using this method when he wrote the famous "theorem".
The incorrect proof probably goes something like this:
It is true that only the prime exponents need to be considered. So consider xn + yp = zp.
Let r be a primitive "pth root of unity" (complex number).
Then the equation is the same...