A century-old Ramanujan formula for calculating pi has been discovered to emerge naturally in modern high-energy physics.