Maybe donuts and Duff Beer are the secret to mathematical brilliance.

It turns out “Simpsons” patriarch Homer Simpson came very close to predicting the mass of the Higgs boson, a particle first theorized to exist in the 1960’s, but only truly discovered in 2012.

Also Read: 11 Surprising ‘Simpsons’ Deaths That Rocked Springfield (Photos)

In “The Wizard of Evergreen Terrace,” a 1998 episode of the long-running Fox series, Homer experiences a mid-life crisis and sets out to emulate the work of inventor Thomas Edison. During this process, he is seen working out a series of complex equations on a blackboard. According to physicist Simon Singh, the equations are those used to predict the mass of the Higgs particle.

Also Read: ‘The Simpsons’ Intro Gets Pixelated in Fan-Made Video

“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,” Singh said in a recent interview. “It’s kind of amazing as Homer makes this prediction 14 years before it was discovered.”

“The Simpsons” apparently has a strong reputation for incorporating high-level mathematics, which is the subject of Singh’s new book, “‘The Simpsons’ and Their Mathematical Secrets.”

Related stories from TheWrap:

'Simpsons' Star Dan Castellaneta to Guest on 'Baby Daddy' (Exclusive)

Ratings: Fox's 'Simpsons,' 'Family Guy' Hit Lows Against Grammys

'The Simpsons' Bart and Lisa Sing About Their Crappy Hometown (Video)