Maths secrets of Simpsons revealed in new book

Nerd hero: The smartest girl in Springfield was created by a team of maths wizards.

The most successful TV show of all time is written by a team of brilliant ‘mathletes’, says writer Simon Singh, and it is full of obscure mathematical jokes. Can numbers really be all that funny?

The world’s most popular cartoon family has a secret: their lines are written by a team of expert mathematicians – former ‘mathletes’ who are as happy solving differential equations as crafting jokes.

Now, science writer Simon Singh has revealed The Simpsons’ secret mathematical formula in a new book*. He combed through hundreds of episodes and trawled obscure internet forums to discover that behind the show’s comic exterior lies a hidden core of advanced mathematics.

Much of this maths is in the form of so-called ‘freeze-frame gags’ – visual jokes that often flash by so fast that you have to press pause in order to see them. Baby Maggie arranges coloured blocks to spell out e = mc2. The Springfield cinema is called the Googolplex – a geeky name for an extremely large sum. A jumbotron at a baseball game flashes the numbers 8108, 8208 and 8191. To most people, these are meaningless digits. To a mathematician, they are a perfect number, a narcissistic number and a Mersenne Prime.

Another of these maths jokes – a blackboard showing 398712 + 436512 = 447212 – sent shivers down Simon Singh’s spine. ‘I was so excited,’ he writes, ‘I almost snapped my slide rule.’ The numbers are a fake exception to a famous mathematical rule known as Fermat’s Last Theorem.

One episode from 1990 features a teacher making a maths joke to a class of brilliant students in which Bart Simpson has been accidentally included. A maths problem about a curve causes the whole class to burst into laughter (the solution is rdrr – har de har har).

Bart is mystified, and most Simpsons viewers will have sympathised. Of the hundreds of millions of people around the world who watch the cartoon, only a tiny fraction will spot these obscure mathematical references for what they are.

But the writers of The Simpsons, people like mathematical prodigy Al Jean or David S. Cohen (who changed his initial to ‘X’ to show his love of algebra), insist that their love of maths contributes directly to the more obvious humour that has made the show such a hit. Turning intuitions about comedy into concrete jokes is like wrestling mathematical hunches into proofs and formulas. Comedy and maths, says Cohen, are both explorations into the unknown.

*The Simpsons and their Mathematical Secrets by Simon Singh is published by Bloomsbury, October 2013.


Can maths really be funny? There are many who will think comparing jokes to equations rather far fetched. Maths is about numbers, which are precise, mechanical, impersonal and abstract. Humour, as the word itself suggests, is about messy chaotic humanity.

On the other hand, perhaps the real secret of humour is that we laugh when we discover something true about the world or about ourselves. If humour is about truth, then jokes and maths are a perfect fit.

You Decide

  1. If you could press a button and magically become a maths genius, would you do it?
  2. Is humour about truth or about humanity, or something else?


  1. What makes things funny? In groups, brainstorm a list of ingredients for the perfect joke, then compare notes with the rest of the class.
  2. Write a script for a comedy sketch involving maths or mathematicians.

Some People Say...

“Maths is for nerds.”

What do you think?

Q & A

I’m no good at maths so I’d never get these jokes.
Maths has a terrible reputation among school subjects. Some people seem to be able to just get it. Other people don’t. Many students are left thinking they are no good at maths, or have no head for numbers. The problem is that thinking you are bad at maths is a self-fulfilling prophecy.
What do you mean?
Many psychological studies have shown that students subconsciously conform to other people’s expectations of them. If students expect to fail they perform significantly worse in tests. Moreover, the idea that some people have maths talent and others don’t makes those who struggle at first quickly give up trying. The truth is that, as with most other things, effort is much more important than ‘talent’.

Word Watch

The Simpsons
The Simpsons, created by cartoonist Matt Groening, first appeared on television as short sketches in 1987. The half-hour show began in 1989 and has been running to huge popular and critical acclaim ever since. It follows the adventures of a middle class family in the middle-American town of Springfield.
A ‘googol’ is 10100. Written out it would have 100 zeros. A googolplex is 10googol – a number with a googol of zeros. If you wrote a googolplex out in full you would need a piece of paper bigger than the observable universe.
Perfect number
A perfect number is a number equal to the sum of its proper positive divisors. They are like perfect humans, as the philosopher Déscartes once said: ‘very rare’.
Narcissistic number
A number which is the product of each digit to the power of the total number of digits. For instance, 153 = 13 + 53 + 33. Only three other such numbers exist.
Mersenne prime
A special kind of prime number that is equal to two to the power of another number minus one. The properties of such numbers are still a mystery to mathematicians.
Fermat’s Last Theorem
In 1637, Pierre de Fermat wrote in the margin to one of his books that he could prove there was no set of numbers that would satisfy the equation xn + yn = zn. He died without writing out the proof, and the theorem then went unproved for the next 350 years.


PDF Download

Please click on "Print view" at the top of the page to see a print friendly version of the article.