For a show as comically dense as The Simpsons, the DVD has meant fans can uncover whole new layers of jokes and references.

After spotting a proof for Fermat’s Last Theorem written on a blackboard, scientist and broadcaster Simon Singh looked deeper into the arithmetic of Springfield’s favourite family.

And he proved an entertaining and passionate guide to the secret mathematic world of The Simpsons – born largely from original writing team members, show runners and former Harvard Lampoon pals Mike Reiss and Al Jean.

As Singh showed, some of the maths references are in plain sight – from the name of the Googolplex Cinema to Kwik-E-Mart proprietor Apu’s backstory as a computer science student.

But hidden in the background of The Simpsons and its sister series Futurama are perfect, Mersenne and narcissistic numbers, famous equations and even tributes to late mathematics genius Srinivasa Ramanujan, all clearly explained and causing both laughter and wonder in the sold-out audience.

The talk was perfectly pitched at everyone with a passing interest in The Simpsons – both those who barely made it through GCSE maths, and pure maths lovers already able to identify a joke in binary code.

And it would have been inspiring for anyone frustrated with the limitations of schoolroom maths and seriously considering whether to take their interest further.