Are the Simpsons trying to drip-feed mathematical morsels into your subconscious?

For a show in its 25 season and still widely regarded as the all-time best, the subtext of ‘The Simpsons’ has, until now, remained remarkably well-hidden. In 1992, President George H.W. Bush suggested that Homer, Marge and Co. were examples of everything American families shouldn’t be, but the truth is much more sinister.

Nearly a decade ago, when British writer Simon Singh was watching an episode titled ‘The Wizard of Evergreen Terrace’, the secret revealed itself to him. The episode contained a veiled reference to Fermat’s Last Theorem (conjectured in 1637, proved in 1995), and Singh, who has written a book by the same name about its centuries-old burden of proof, couldn’t not notice it. It led to a hunch, which hardened to conviction with continued viewing, that ‘The Simpsons’ is an attempt to “drip-feed morsels of mathematics into the subconscious mind of viewers”.

In his new book, The Simpsons and their Mathematical Secrets, Singh provides ample proof. Explaining his approach, he says, “First, it was about extracting all the mathematics so that I knew what all there was to write about… I don’t try and explain all the mathematics, because there’s so much of it. But I could pick the most interesting bits, and turn that database into something that brings the programme and the maths alive.”

A populariser of difficult mathematical and scientific concepts, Singh has, apart from Fermat’s Last Theorem, written The Code Book, which tracks the science of secrecy from Ancient Egypt to Quantum Cryptography; Big Bang, about the eponymous model of the universe, and co-written Trick or Treatment, which exposes many of alternative medicine’s claims as lies. In his new book, his aim is akin to that of ‘The Simpsons’ — to educate while entertaining.

The mathematical references in the show range from the arcane to the familiar. Of the latter, the humble ð is a good example. It found mention in an episode titled ‘Simple Simon’, where Homer disguises himself as SimpleSimon, Your Friendly Neighbourhood Pie Man, and punishes evildoers by flinging pies at them. This leads a character to remark “we all know pie are square, but today pie are justice”.

Singh provides the context for the joke, but also goes on to explain the origins of the symbol for pi, the various efforts to calculate its value, a 19th century bill that proposed to legislate an official value for pi, and this limerick:

’Tis a favourite project of mine/ A new value of pi to assign/ I would fix it at 3/ For it’s simpler, you see/ Than 3 point 14159.

The book unpacks similar jokes about Mersenne primes, Euler’s equation and infinity, among others. According to the author, who watches “everything except dramas” on TV, what makes the show unique are the writers. Through mathematics, Singh introduces the creators of the show, such as Al Jean, Ken Keeler, David S. Brook and J. Stewart Burns, all of whom trained in mathematical subjects before joining the entertainment industry.

A lot of the mathematical humour in the show owes itself to their wistfulness for the subject they abandoned. “They are not mathematicians anymore, but they love mathematics. It’s their way of expressing their love and having fun amongst themselves,” says Singh. At the same time, this love had to be contained in order not to alienate the general viewer.

Explaining the mechanism by which ‘The Simpsons’ manages to endear itself to the nerd and the lay viewer alike, Singh says, “Only a fraction of people will get these jokes, so you don’t want them to get in the way of the story. You put them there for a fraction of a second, or in a place where no one will notice it, so the people who love mathematics will spot it and get their excitement, and the people who don’t, they don’t have a problem. It doesn’t get in the way for them… There were times when some writers said ‘why are we doing this? No one understands this joke’. And other writers would say ‘well, even if only one person gets the joke, they will get a fantastic kick out of it’.”

Indeed, far from disqualifying them, the writers’ mathematical background enriches the process of joke creation. They are all given to a fondness for puzzles which, the author explains, aren’t so different from jokes after all.

“Both have carefully constructed set-ups, both rely on a surprise twist and both effectively have punch lines. Indeed, the best puzzles and jokes make you think and smile at the moment of realisation. And perhaps that is part of the reason why mathematicians have proved to be such a valuable addition to the writing team of ‘The Simpsons’,” says Singh.