Some have seen philosophy embedded in episodes of The Simpsons; others have detected elements of psychology and religion. Simon Singh, bestselling author of Fermat's Last Theorem, The Code Book and The Big Bang, instead makes the compelling case that what The Simpsons' writers are most passionate about is mathematics. He reveals how the writers have drip-fed morsels of number theory into the series over the last twenty-five years; indeed, there are so many mathematical references in The Simpsons, and in its sister program, Futurama, that they could form the basis of an entire university course. Using specific episodes as jumping off points - from 'Bart the Genius' to 'Treehouse of Horror VI' - Simon Singh brings to life the most intriguing and meaningful mathematical concepts, ranging from pi and the paradox of infinity to the origins of numbers and the most profound outstanding problems that haunt today's generation of mathematicians. In the process, he introduces us to The Simpsons' brilliant writing team - the likes of Ken Keeler, Al Jean, Jeff Westbrook, and Stewart Burns - who are not only comedy geniuses, but who also hold advanced degrees in mathematics. This eye-opening book will give anyone who reads it an entirely new mathematical insight into the most successful show in television history.