Fermat's Last Theorem

Fermat's Last Theorem was a mathematical statement. It stated that equations of the form yn = xn + zn were insoluble if n was greater than 2. Pierre Fermat indicated that he had proved it, but never wrote it down. Others had tried, and failed, to discover his proof ever since. (PROSE: Millennial Rites)

The Library of St John the Beheaded possessed the proof of Fermat's Last Theorem. (PROSE: All-Consuming Fire)

The Seventh Doctor, while waiting at a Masonic lodge, devised a five-line solution to Fermat's last theorem using only Boolean algebra. (PROSE: The Death of Art)

According to Shogsten Vumm, the code Isaac used in his message to Mila Rraxhimi "[was] not Fermat's Last Theorem." (PROSE: The Earwig Archipelago)

Fermat's Last Theorem was finally solved with the aid of computers by approaching the proof sideways, but according to Ethan Amberglass, it wasn't solved the way Fermat indicated it could be. Ace believed that the Doctor knew Fermat's solution. (PROSE: The Algebra of Ice)

In 1999, Ashley Chapel Logistics solved Fermat's Last Theorem algebraically. (PROSE: Millennial Rites)

In 2008, the Eleventh Doctor used a proof of Fermat's Last Theorem to convince a body of geniuses they should take his advice about how to save the world from annihilation by the Atraxi. He uploaded the proof — which the Doctor called "the real one, never been seen before" — to a secure video conference from a laptop computer in Leadworth. Simultaneously, he muttered an acknowledgment to the originator of the theorem, Fermat, and mentioned that he got killed in a duel before he could write down his own proof. He claimed responsibility for the death of the latter, saying that it had only happened because he had slept in that morning. (TV: The Eleventh Hour)

Behind the scenes
Details in the Doctor's speech indicate differences from the recorded history in the real world. The theorem was actually proved using modern mathematics in the 1990s, but the Doctor's clarification that he was sending "the real one", which leads us to believe that he meant the proof that Fermat supposedly had but couldn't write it down and not the proof of Dr Andrew Wiles who used modern mathematics. The other reference is to, a 19th century mathematician, who was killed in a duel, whose work on the theorem was fundamental to the 1990s proof.