For the first time, scientists have discovered a classic formula for pi in the world of quantum physics. Pi is the ratio between a circle's circumference and its diameter, and is incredibly important in pure mathematics, but now scientists have also found it "lurking" in the world of physics, when using quantum mechanics to compare the energy levels of a hydrogen atom.

Why is that exciting? Well, it reveals an incredibly special and previously unknown connection between quantum physics and maths.

"I find it fascinating that a purely mathematical formula from the 17th century characterises a physical system that was discovered 300 years later," said one of the lead researchers, Tamar Friedmann, a mathematician at the University of Rochester in the US. Seriously, wow.

The discovery was made when Carl Hagen, a particle physicist at the University of Rochester, was teaching a class on quantum mechanics and explaining to his students how to use a quantum mechanical technique known as the 'variation principle' to approximate the energy states of a hydrogen atom.

While comparing these values to conventional calculations, he noticed an unusual trend in the ratios. He asked Friedmann to help him work out this trend, and they quickly realised that it was actually a manifestation of the Wallis formula for pi – the first time it had even been derived from physics.

"We weren't looking for the Wallis formula for pi. It just fell into our laps," said Hagen. "It was a complete surprise," added Friedmann. "I jumped up and down when we got the Wallis formula out of equations for the hydrogen atom."

Since 1655 there have been plenty of proofs of Wallis's formula, but all have come from the world of mathematics, and the new results have people freaking out. The results have been published in the Journal of Mathematical Physics.

You can see two pages from Wallis's book Arithmetica Infinitorum below:

"This almost seems like magic … that a formula for π is hidden inside the quantum mechanics of the hydrogen atom is surprising and delightful."

"Nature had kept this secret for the last 80 years," said Friedmann. "I'm glad we revealed it."

We just can't help but wonder what other secret connections are lurking between quantum mechanics and pure mathematics.