Homer Simpson almost predicted the mass of the elementary particle, the Higgs boson, more than a decade before it was discovered, according to a new book on maths in The Simpsons.

In the episode “The Wizard of Evergreen Terrace”, aired in 1998, Homer becomes an inventor and is shown in front of a blackboard with a complicated equation.

“That equation predicts the mass of the Higgs boson” Simon Singh said. “If you work it out, you get the mass of a Higgs boson that’s only a bit larger than the nano-mass of a Higgs boson actually is. It’s kind of amazing as Homer makes this prediction 14 years before it was discovered.”

Dr Singh, author of The Simpsons and their Mathematical Secrets, said: “The Simpsons is the most mathematical TV show on prime-time television in history,” adding: “A lot of the writers on The Simpsons are mathematicians.” He said the first full episode of The Simpsons had a joke about calculus, adding there was a “tonne of maths” in the show which references concepts including Fermat’s last theorem, perfect numbers, mersenne primes and narcissistic numbers.