Today, I will be writing about one of the most elegant discoveries by my favorite mathematician, Srinivasa Ramanujan.
This might come as a surprise to you: this genius mathematician never received any formal degree in mathematics.
To hint at Ramanujan’s unmatched intelligence, let me tell you that he wrote about mock theta functions in a letter to G. H. Hardy in 1920, while he was on his deathbed with tuberculosis. These very functions, ladies and gentlemen, have found applications in explaining certain aspects of black hole physics, particularly black hole entropy in string theory.
And let me surprise you by saying that black holes were barely understood when Ramanujan wrote about these functions. Scientists, after God knows how much effort, have finally uncovered remarkable connections between his work and black hole physics in the 21st century.

Srinivasa Ramanujan (1887–1920)
For today’s article, I request you all to read this with pen and paper (or your iPad) in hand because it will definitely help you understand the subject matter in a very interesting and beautiful manner.
First, let me give the problem for today:
Compute :
Basically, is the sum of all natural numbers.
In my last writing, we talked about the AP formula (through the Gauss story). You cannot use that formula here because we do not have a finite number of terms. As you can see, is the sum of all natural numbers, and we know that there are infinitely many natural numbers.
If you consider in that formula (or, rather, more mathematically, take the limit as tends to infinity), you will get the answer infinity.
In standard calculus, a series is considered convergent if its sequence of partial sums approaches a finite limit. Otherwise, it is considered divergent.
So, by that logic, it should be diverging, right?
Yes, it is diverging if we follow standard calculus.
But:
In the year 1913, the genius mathematician Srinivasa Ramanujan wrote in his second letter to the British mathematician G. H. Hardy about a remarkable result involving divergent series. The sum of all natural numbers is famously associated with the value .
He famously wrote the following in the letter:
“If I tell you this you will at once point out to me the lunatic asylum as my goal.”
Now, mathematically, this is the expression we are interested in:
I know most people reading this would say this is idiotic on so many levels. Because how can the sum of all natural numbers be a finite value? And even if it could be a finite value, how on earth would that equal a negative fraction?
Well, there is a catch.
The ordinary sum does not equal . The series diverges in the usual sense. However, there is a mathematical technique called regularization that allows us to associate the value with this series in a different, well-defined sense.
Let us first explore the beautiful heuristic argument that makes this result so fascinating. I will then show you the rigorous mathematical idea behind it.
The Heuristic Proof
We want to compute:
First, let us try to compute another series, :
This series is known as the Grandi series.
In standard calculus, this series diverges. If you do not understand this, don’t worry, because calculus is not the core topic of discussion today.
I will explain why this series diverges in a simpler way.
You can see that has an infinite number of terms.
Let’s try to compute the sum of just the first term: that will be . Similarly, let us compute the sum of the first two terms: that will be . Similarly, for the first three terms: . For the first four terms: .
You will notice how the sums oscillate between and :
They never approach a single finite limit, and this is why diverges.
The approach we used here, which was computing the summation for the first few finite terms, is called a partial sum!
So, this series is diverging, right? Again, in standard calculus, yes!
But let us explore this further.
We have:
If we formally manipulate this expression, we might write:
Since the expression in parentheses looks like , we might write:
Simplifying this gives:
WOW!! We just arrived at , even though is divergent under standard calculus.
But wait!
This is not a valid proof that the ordinary sum equals . The algebraic manipulation assumes that the infinite series behaves like a finite sum, which is not justified here.
However, there are other beautiful mathematical methods, such as Cesàro summation and Abel summation, that assign the Grandi series the value in their respective senses. But that’s not the core topic of discussion today.
So, we have a meaningful way of assigning the value to this series, even though it does not converge in the ordinary sense.
Now, let us take another series, :
This series is again divergent using standard calculus. But, behold!
Let us add to itself, shifting the second copy by one place to the right:
Simplifying each term:
Behold! The right-hand side is the same series we discussed earlier, the Grandi series (), which elegantly equals .
So,
So, we have found that the series equals , even though this is not true in standard calculus.
Now let us actually find , which is the series of our utmost interest today:
Multiply both sides by :
Now, what is ?
Let us subtract from , aligning the terms under their corresponding multiples of :
Simplifying each pair:
Behold! The right-hand side is , discussed earlier, which equals .
Substituting the right-hand side with , we get:
Yayyy!!! We have arrived at the famous result that the sum of all natural numbers is , using our heuristic approach.
Of course, as discussed earlier, this is not a valid calculation under standard calculus, because the series involved are divergent. The result is obtained rigorously through zeta-function regularization, which we will discuss next.
The Rigorous Proof
This is the Riemann zeta function:
Or, written out:
I know this might seem very confusing, and you might be wondering where we got this from. But just trust me that this is the Riemann zeta function, because explaining the zeta function in full detail is DEFINITELY not part of today’s discussion.
There is one important detail, though.
The infinite series defining the zeta function converges only when the real part of is greater than .
In other words:
So, what happens when we plug in ?
If we simply substitute into the original infinite series, we obtain:
But this series diverges!
Therefore, we cannot use the original definition of the zeta function at .
However, here comes the beautiful part.
Complex analysis allows us to extend the Riemann zeta function beyond the region where its original series converges. This process is called analytic continuation.
The analytically continued zeta function is well-defined at , and its value there is:
This is a rigorous mathematical result.
The important distinction is that we are evaluating the analytically continued zeta function, not the original infinite series at .
This gives us the famous relationship:
The symbol here represents a regularized value, not ordinary convergence.
That’s it! We have shown how the value arises from the sum of all natural numbers through zeta-function regularization.
Here’s a disclaimer: If you are asked to compute in your calculus class, don’t write if you want good grades! Because, again, in standard calculus, the series diverges.
However, this regularized value is deeply meaningful in modern physics: it appears in bosonic string theory (where it directly accounts for the critical spacetime dimension of ) and in quantum field theory calculations involving the Casimir effect.
This was just a small overview of the sheer brilliance of Ramanujan. I have so many more stories to share about Ramanujan, and I will do so in my future writings.
Again, as always, my primary objective is to write about the beauty of mathematics in such a way that even a reader with no mathematical experience may enjoy it.
Till then, here’s a quote from Ramanujan:
“An equation for me has no meaning, unless it expresses a thought of God.”
— Srinivasa Ramanujan
Happy learning!