Simon Singh and John Lynch’s film tells the enthralling and emotional story of Andrew Wiles. A quiet English mathematician, he was drawn into maths by Fermat’s puzzle, but at Cambridge in the ’70s, FLT was considered a joke, so he set it aside. Then, in 1986, an extraordinary idea linked this irritating problem with one of the most profound ideas of modern mathematics: the Taniyama-Shimura Conjecture, named after a young Japanese mathematician who tragically committed suicide.

The link meant that if Taniyama was true then so must be FLT. When he heard, Wiles went after his childhood dream again. “I knew that the course of my life was changing.” For seven years, he worked in his attic study at Princeton, telling no one but his family. “My wife has only known me while I was working on Fermat”, says Andrew.

In June 1993 he reached his goal. At a three-day lecture at Cambridge, he outlined a proof of Taniyama – and with it Fermat’s Last Theorem. Wiles’ retiring life-style was shattered. Mathematics hit the front pages of the world’s press. Then disaster struck. His colleague, Dr Nick Katz, made a tiny request for clarification. It turned into a gaping hole in the proof. As Andrew struggled to repair the damage, pressure mounted for him to release the manuscript – to give up his dream. So Andrew Wiles retired back to his attic. He shut out everything, but Fermat.

A year later, at the point of defeat, he had a revelation. “It was the most important moment in my working life. Nothing I ever do again will be the same.” The very flaw was the key to a strategy he had abandoned years before. In an instant Fermat was proved; a life’s ambition achieved; the greatest puzzle of maths was no more.