The man, the mind, the series, and 314 trillion digits

by Dilip D’Souza

Ramanujan with his formula
Hail Ramanujan, and π (courtesy https://www.linkedin.com/pulse/srinivasa-ramanujan-mathematical-genius-sahil-sajad-k4psc)

Here’s a factoid that, over a century later, still stuns: In 1914, the mathematician Srinivasa Ramanujan published an academic paper in which he spelled out 17 – yes, seventeen – formulas to calculate π (pi). 

This is remarkable on many levels. Most of us run into π in school, via an approximation. That’s usually 3.14, or 22/7. We learn that it is the ratio of a circle’s circumference to its diameter, and those approximations are usually close enough to the actual value of π for most purposes we might encounter in school. At some point we might even have come across Aryabhata’s approximation:

Add 4 to 100, he said, and multiply the result by 8. Add 62,000. Divide the result by 20000. The answer, he said, approaches the ratio between the circumference and diameter of a circle. [My free and easy translation of his words.]

And that answer is 3.1416, which is π accurate to four decimal places. Which is π good enough for most calculations most of us would attempt. After all, it differs from π by about 0.0002 percent, which percentage by itself is hard to comprehend – though the word “approaches” fits well.

Now if you are interested in precision engineering, or in travelling into space, you will want more decimal places. 15 is the number NASA used in its calculations for the Voyager I mission it launched in 1977. That intrepid spacecraft is now sailing through interstellar space about 26 billion km from the Earth, so it’s safe to say the 15 digit calculations have served it, and NASA, well.

More recently – well, as I write this! – Artemis 2 is on its way to the Moon carrying four astronauts. Its path to our satellite is a tribute to careful, intricate calculations. I say that because there is really no sense in which the four astronauts in that spacecraft are piloting their voyage to the Moon. Instead, they are following a precisely-determined path. π was certainly part of that determination – so if the value used was accurate to four decimal places, would that have been enough?

Well, consider the 0.0002 percent error I mentioned above. Apply that to the 300,000 km that separate the Moon from our Earth, to get 600m. Strictly, this calculation doesn’t mean much of anything – to begin with, Artemis is not flying in a straight line 300,000 km long to the Moon. But that 600m gives you at least an idea of the kind of error using only four digits of π can produce: over 300,000 km, more than half a km. Compound that over the whole journey and you can imagine that Artemis might end up soaring aimlessly into space, with no hope of rescue. But take π accurate to 7 decimal places and that error shrinks to 4.5m. Small, but still like the height of a one-storey building. But move along to 15 decimal-place accuracy, and we’re looking at – get ready – a fifty-thousandth of a millimetre.

No wonder NASA uses 15.

More digits still? Here’s another pretty well-known factoid: if you use 40 digits of π, you can  calculate the circumference of the universe – an unimaginably larger distance than to the Moon – accurate to within the diameter of a hydrogen atom. That’s 200 times tinier than the fifty-thousandth of a mm that I touched on above.

I’ll let you take a minute to comprehend the sheer spectrum of scale the numbers in those last few lines bring to mind. Spare a few seconds, too, to marvel at the astronauts who, in a very real sense, place their journey to the Moon – their life itself – in the capable hands of mathematics and nothing else.

But enough with these mind-numbing numbers, and let’s return to Ramanujan. In December 2025, two scientists at the Indian Institute of Science published a paper in which they “uncover [the] physics origin” of his formulae. This “unexpected mathematics-physics connection” got plenty of Ramanujan fans – me included – looking again, marvelling again, at his astonishing formulas.

Now the number of digits of π is one thing. But how do we get those digits? That is, how do we calculate the value of π? Or more correctly, how do we calculate approximations to the value of π? No, it’s not by drawing a circle, carefully measuring its circumference and diameter and dividing one by the other. Instead, we have formulas that give us such approximations – formulas that mathematicians call “infinite series”. This means two things. One, that you can never pin down the value of π. But you knew that: π is an “irrational” number, meaning it can’t be expressed as a fraction and it has an infinite number of digits. But two, you can get arbitrarily close to the value of π by using ever-more of the terms in the series.

What’s more, there are many such series for π. In fact, it is by running across ever-more of them that I came to understand about this exotic number that it is ubiquitous, it turns up unexpectedly and its connection to circles is almost incidental.

Here’s the first series for π I ever ran into:

π/4 = 1 – 1/3 + 1/5 – 1/7 + 1/9 …

This series was discovered by the mathematician Madhava in the 14th Century. To me, it is both pleasing and surprising. How does such a simple manipulation of the odd numbers produce π? Yet examine it more closely, or try to use it, and it isn’t so pleasing after all. For it takes many many terms to give us worthwhile approximations to π. For example, for two-decimal accuracy, you’d need over 300 terms; that is, you’d have to go past 1/601.  Madhava himself used it to calculate π to 13 decimal places, which factoid (the third stunner in this column) fills me with awe.

And this is why Ramanujan’s various infinite series for π are so remarkable.

For example, one of the 17 series he lists in that paper starts with these three terms:

1/π = 5/16 + 47/8192 + 2403/33554432 …

Stop with just those three terms and you have π as 3.1416 – the four digit approximation that that earlier genius Aryabhata came up with.

Or take this other Ramanujan concoction (the word really applies):

Formula for Ramanujan's infinite series for pi
Go ahead, calculate π

This is known as the Ramanujan-Sato formula. Don’t get discouraged by the symbols, and allow that “k” and “n” from the image at the top are interchangeable. But allow yourself too, to gasp, for its very first term, also in that image is this:

2  x √2 x 1103 / 9801

… which gives us π = 3.1415927 – meaning, accurate to seven decimal places right off the bat. Add the second term and we have accuracy to 14 decimal places. Mathematicians say a series like this “converges rapidly”, as opposed to the extremely slow convergence of Madhava’s series. In fact, there are series that converge even more rapidly than this one. They were used to set world records for digits of π that we’ve seen over the last few years, the latest being 314 trillion digits. (No, I don’t know if that 314 has anything to do with 3.14 being an approximation to π.)

All right. There’s no reason in the known universe, not even Artemis 2, for using 314 trillion digits of π. But there’s every reason to marvel, yet again, at the mind of the man who churned out the incredible formulas that churn out those digits. Hail Ramanujan.