Homer Simpson might not be the sharpest tool in the shed, true. But if you pay close attention to "The Simpsons," you may notice that the writers behind the long-running animated comedy are gigantic math geeks.
That's the word from Simon Singh, a best-selling author with a Ph.D. in particle physics. In his new book, "The Simpsons and Their Mathematical Secrets," Singh argues that the show is littered with mathematical references.
"About 10 years ago I spotted a reference to Fermat's last theorem in an episode titled 'The Wizard of Evergreen Terrace,'" Singh told The Huffington Post in an email, referring to the notorious problem that stumped mathematicians for more than 300 years. "I then noticed that the theorem also had a cameo role in 'Treehouse of Horror VI,' and then I started paying more attention and realized that the series has dozens of mathematical references ranging from simple concepts like pi to appearances by great unsolved problems in mathematics."
But maybe all this math shouldn't come as a surprise. After all, the show is put together by several writers with backgrounds in math and science. The show's executive producer, Al Jean, went to Harvard at age 16 and earned a math degree. Head writer David X. Cohen studied physics at Harvard and computer science at the University of California, Berkeley. And writer Jeff Westbrook, taught computer science at Yale University before coming to the show.
What might attract math geeks to comedy writing?
"One theory that many of them share is that mathematicians love logic," Singh said in an interview with Brady Haran for the math video series Numberphile. "And therefore they love breaking logic and playing with logic and they love the illogical, and a lot of humor is based on that."
For more on math in "The Simpsons," check out the full interview in the video below.