Fermat was a 17th century lawyer who did maths in his spare time, corresponding with many other mathematicians around Europe. He had a habit of setting little challenges to his correspondents - "I can prove this, can you?". He's famous now for an annotation he made in a book - that he had found a proof that an + bn = cn has no positive integer solutions when n>2 "which this margin is too narrow to contain". The guests on the episode of In Our Time that discussed it were Marcus du Sautoy (University of Oxford), Vicky Neale (University of Cambridge) and Samir Siksek (University of Warwick).

They started off by setting the theorem in context. It's a generalised form of Pythagorean Theorem - the one we all (probably!) learnt at school. For a right-angled triangle the sum of the squares of the two shorter sides is equal to the square of the longer side (the hypotenuse). And du Sautoy pointed out that this has a very practical application - if you have a rope with equally spaced knots in it and you arrange it into a triangle with sides 3, 4 and 5 then you are guaranteed a right-angle between the sides of length 3 & 4. Useful for building pyramids. And other things you want the corners to be right-angles on. So for n=2 we know there are some positive integer solutions.

It's also a sort of equation called a Diophantine Equation - these are polynomials that only have positive integer values of their variables. So other examples are things like x2=y3-2 (which has at least one solution - 52=33-2). Some Diophantine Equations have no solutions, some have finite numbers of solutions, some have infinite. And the question is what sort of equation Fermat's Last Theorem is.

Fermat never wrote his proof down anywhere, and the experts were suggesting that perhaps he never actually had a generalised one. That his proof by infinite reduction of the case where n=4 was all he'd done (and then was suggesting that must be the case for all the other possible values). The equation itself isn't a particularly interesting one and hasn't any direct practical applications, but it became famous because no-one could find the proof that Fermat said he had. Various famous (and otherwise) mathematicians tried to find the proof - the one that they discussed that I particularly remember is Sophie Germain, who was a French mathematician in the late 18th/early 19th Century. At that time she couldn't study mathematics formally because she was a woman, so she was self-taught & corresponded with other mathematicians using a male pen-name. She found a way to inspect particular values for n to show that there were no solutions - and used this to prove the theorem for values of n up to 100. Neale clearly found Germain particularly interesting as she nearly got side-tracked into a bio of her before being pulled back to the subject at hand :)

During the 19th & 20th Centuries there were several monetary prizes on offer to people who found a proof, but no-one did until Andrew Wiles in 1997 (just before the time limit on that particular competition). They did discuss a bit about what his proof was, but I didn't follow it well enough to remember it well enough to explain it - it had something to do with mapping these sorts of algebraic equations to elliptic curves, and if you could show there was no possible curve then there must be no solutions to the equation.

They summed up the programme (very briefly) by saying that even though the equation isn't itself terribly important the effect of the competition to solve it was to drive forward several other areas of mathematics that do have practical applications.