How does a very brainy mathematician prepare to write his latest scholarly tome – not, one might imagine, by lying on the sofa and watching hundreds of episodes of *The Simpson*s back to back. Yet that is exactly what Simon Singh did, day after day, when he was researching his book *The Simpsons and their Mathematical Secrets.* His theory within opens the way for nerdy to be the new cool.

Just as *The Big Bang Theory* has been fearless in throwing scientific references galore into their geekcentric sitcom, apparently *The Simpsons* has been doing this all along with math. Simon Singh first noticed this about 10 years ago. He was watching the show when he saw out of the corner of his eye, an equation written on a blackboard. To his surprise, he recognized it as a very close relation to Fermat’s Last Theorem, a subject on which he had previously written a best-selling book.

Fermat’s Last Theorem is renowned for its complexity. The subtitle of Singh’s book on it was “The story of a riddle that confounded the world’s greatest minds for 358 years.” So what was it doing in a cartoon? Albeit *The Simpsons* has been analyzed from every angle possible for its political, psychological, philosophical, sociological and theological viewpoints, among others, had anyone ever realized what a minefield of mathematics it was. The further Singh looked into it, the more he uncovered. The truth is, as Singh became to accept, that the writers of *The Simpsons* are “deeply in love with numbers.” So much so, argues Singh, that they set out to subconsciously “drip-feed morsels of mathematics” into the unsuspecting minds of the viewing public.

When he went on to spend an entire week in the company of the creative team, they cheerfully admitted their addiction. Topics from Mersanne prime numbers to pi had all been incorporated into storylines. The writers delighted in tucking these in-jokes, references and equations into various nooks and crannies of the plotting, where they were never intended to get in the way of the story-telling, but to enhance and elucidate the overall scope and ambition of the series.

In his discussions with the creators, Singh found that they love the concept that the maths is hidden and yet keen-eyed fans are able to detect it. They confessed that they rushed onto chatrooms after each episode had aired to see if discussions were taking place about the theorem they had squirreled away. They particularly relish the thought that young people who are keen on the subject of mathematics can get a thrill out of these discoveries. They hope this allows them to feel proud about their talent for numbers and to realize that it does not make them geeks. They too may grow up and have a super cool job like a scriptwriter for *The Simpsons.*

Singh says that the math in the series goes way beyond the simple stuff. He admits that some of it goes far and beyond what he wrote about himself in Fermat’s Last Theorem. This pleases him enormously, because he is a great believer in the power of science and why it really matters. To that end, he is a ferocious opponent of what he sees as unscientific thinking and the way it gets reported in the media.

After he completed his PhD at Cambridge University, the young Singh faced the fact that he was never going to become one of the leading scientists of his time. He looked around him and appreciated that others had sharper minds and were, to put it bluntly,brighter than him. Trying to think where to turn, he hit on the idea of communicating about science instead. He has since combined his writing and presentation talents with his passion for his subject to become one of the leading populist science broadcasters. Like Brian Cox and Karl Kruszelnicki, he has an ability to get across highly sophisticated and difficult ideas in a manner that is easy and informative. He has gone on to condone what he sees as “bad science” (Homeopathy is a special target for his rage) and celebrate all great scientific achievement with boundless enthusiasm.

It may still come as a shock to many to include *The Simpsons *in that latter category. In Singh’s opinion, mathematics is the “primary subtext” of the long-running and hugely successful cartoon; or, as he calls it, ”arguably the most successful television show in history.” Certainly, since it has been ruling the airwaves since 1989, no-one else has come along to give it an A+ for its maths prowess.

In *The Simpsons and their Mathematical Secrets*, Singh covers many concepts he found in the episodes. Infinity, probability and topology are all there, as are “Ramanujan numbers” also known as “taxicab numbers.” This is the number of a taxi that was taken by GH Hardy, a Cambridge mathematician, when he went to visit his colleague, Srinivasa Ramanujan in Putney, in a nursing home at the end of World War I. It is obtained by expressing the sum of two cubes in two differing ways and the smallest one is 1729.

Ramanujan numbers are not the hardest math in *The Simpsons*. These are things like appendices and fractional dimensions. In the episode “Girls Just Want to Have Sums,” Principal Skinner suggests that boys are better than girls at math. Bart reckons he turns Lisa into a “burping, farting, bullying math machine,” ie a boy, so that she can go to the top of the class. She does, but feels she has to abandon everything she believes in to gain this achievement. Singh thinks that they “sidestepped” a “controversial issue” here, but it does raise the question, to whom is he aiming his book? It ranges from a general Simpsons viewer of either sex, or a math graduate who, like many of the writers, has studied at a postgraduate level at Harvard or Princeton.

There is some in-built reader testing with a sequence of examinations ranging from elementary school right up to PhD level. Homer would be unlikely to pass any of them. In the Halloween episode of 1995, Homer3, Homer was catapulted into a 3D universe. This is one of the intensely mathematical episodes of them all.

The letters NP and P appear over Homer’s shoulder. P is for polynomial and NP is for non-deterministic polynomial. NP problems are supposed to be harder to solve than P ones, and these letters wouldn’t make sense to most viewers. However, they allude to one of the most important unsolved puzzles in computer science. Other math in this episode includes the equation known as Euler’s identity, a message written is ASCII that looks like a sequence of Hexadecimal digits but reads “Frink Rules!” and a Utah teapot. This is an object that tests other 3D objects that have been created on a mathematical model.

Singh laments that he has not yet uncovered a sighting of the number 1,000,000,000,000,066,600,000,000,000,001 otherwise known as Belphegor’s prime. Belphegor is one of the seven princes of hell and the number has 666 at its core and 13 zeroes to either side. Like all prime numbers it is only divisible by itself and by one. In Singh’s opinion it is a “terrifying” number and he suspects it will put in an appearance in a future Halloween episode.

*The Simpsons* writer David X Cohen has added that Singh has single-handedly “blown the lid” on their long “conspiracy” to “secretly educate cartoon viewers.” Singh’s ambition with the book is to get people interested in science, and what better medium to catch their attention than through the world’s most loved TV show and characters.

Whether people knew they were getting a sneaky math lesson or not, Simon Singh has certainly gone all out to sum up *The Simpsons* in a whole new numerical light.

By Kate Henderson

Actually, the people who “blew the lid” on the Simpsons mathematical conspiracy were Sarah J. Greenwald and Andrew Nestler in their simpsonsmath.com website and the courses they’ve taught. Their work on this predates that of Simon Singh, and goes back at least to 2001.