Fermat's last theorem is one of the most beguiling results in mathematics. In 1637 mathematician Pierre de Fermat wrote into the margin of his maths textbook that he had found a "marvellous proof" for the result, which the margin was too narrow to contain.

If you look at the theorem you can see why Fermat might have thought that he found an elegant proof: the theorem is easy to explain, even to primary school students. But the proof turned out to be elusive even to the most talented mathematicians. It wasn't until over 350 years after Fermat's scribble that Andrew Wiles announced a proof, after years of working in secrecy and using mathematical machinery that goes well beyond the theorem's humble appearance. When Wiles announced the proof at the Isaac Newton Institute in Cambridge the atmosphere, according to eye witnesses, was electric.

This selection of articles and videos explores the theorem, some of the maths used in the proof, Andrew Wiles' monumental effort to find it, and also some other relevant bits of maths. Enjoy!

A vey old problem turns 20 — This article, published on the 20th anniversary of the announcement of the proof, gives a brief overview of Fermat's last theorem and the battle for its resolution.

Andrew Wiles: What does it feel like to do maths? — These two videos, and accompanying article, document a fascinating encounter we had with Wiles at the Heidelberg Laureate Forum in 2016. Wiles talks about what it was like to finally prove such an important result and what it feels like to do maths in general — it's a bit like composing a symphony!

Fermat's last theorem and Andrew Wiles — This article looks at the maths behind the proof in a little more detail and contains some beautiful thoughts of Wiles himself about his quest. (The image shows a portrait of Fermat.)

Ramanujan surprises again — In 2015 two mathematician discovered a manuscript by another mathematical legend, Srinivasa Ramanujan, and found that he too had been working on Fermat's last theorem. Wiles is in good company indeed!

Answers on a donut: the Fields medal lecture of Manjul Bhargava — In 2014 Manjul Bhargava won the Fields medal, one of the highest honours in maths, for work that's related to the maths behind Fermat's last theorem.