Ramanujan summation: How does 1+2+3+4... = -1/12?

Nice summation.

Thank you. Have you anything to say in addition?

3rd base!

TLDR; I can get obsessive about things like this, so I investigated how do you show that \zeta(-1)=-1/12. Here is what I came up with.

I decided to try to find out why \zeta(-1)=-1/12 and came across this
wonderful article by well-known mathematical physicist John Baez (and
cousin of Joan, BTW):
%1 + 2 + 3 + 4 + ⋯ - Wikipedia
I will try to explain how he calculates, entirely legitimately,
\zeta(-1). To motivate it, he gives a wholly illegimate computation,
which is actually Ramanujan’s. The reason it is illegimitate is that
you cannot manipulate divergent series that way. You also cannot
manipulate conditionally convergent series either. You can when the
series of absolute values converges. As an example, you can rearrange
the terms of 1-1/2+1/3-1/4+\cdots, which converges to \log2, to
converge to 0 or to \pi or -\infty or anything else.

Why bother giving a bad argument? Because it motivates a perfectly
valid argument. Watch.

Now here is what Ramanujan did. Let c=1+2+3+4+\cdots. Then
4c=0+4+0+8+\cdots. (It is the insertion of those zeroes that would be
legitinate in an absolutely convergent series, but not here.) Subtract
the second from the first, to get -3c=1-2+3-4+\cdots. Now that
series, although also divergent, can be calculated as the value at 1
of 1-2x+3x^2-4x^3+\cdots which is
\frac d{dx}(x-x^2+x^3-x^4+\cdots)=\frac d{dx}\frac x{1+x}=\frac 1 {(1+x)^2}
whose value at 1 is 1/4. Since -3c=1/4, c=-1/12.

Now here is correct adaptation of that argument. Define, as in my
earlier post, \zeta(s)=1^{-s}+2^{-s}+3^{-s}+4^{-s}+\ldots. This is
continued, by the magic of analytic continuation to a function that
converges–and absolutely–everywhere except at s=1. Since the
convergence is absolute, any normal manipulation is kosher. Then
4\zeta(s)=0+4\times 1^{-s}+0+4\times 2^{-s}+\cdots. Since the series
converge absolutely everywhere except s=1, this insertion of zeroes is
valid. Then subtract to get
-3\zeta(s)=1^{-s}-2^{-s}+3^{-s}-4^{-s}+\cdots. This series is called
\eta(s). Although this is valid for the analytic functions involved,
the series diverge when s=-1. But it is true that
\eta(-1)=\lim_{x\to 1^-}(\eta(s)). This means the limit from
the left. While
this limit exists, the series doesn’t represent it. What to do?

At this point, Baez introduces an argument that I don’t quite follow, so
here is my take on the rest.

One thing that you can try with a divergent series is what is called
Cesaro summation. This actually applies to a sequence, here the
sequence of partial sums. Basically, if a_1,a_2,a_3,\ldots is a
sequence, you replace a_k by the average of the first k
terms (a_1+a_2+\cdots a_k)/k. This has the property that applied to
any convergent sequence it produces a convergent sequence with the same
limit, but applied to some divergent sequences it produces a convergent
sequence. For example, if you apply it to 1,0,1,0,1,0,\ldots, it
produces 1,1/2,2/3,1/2,3/5,\ldots and this converges to 1/2. This
is one way to see that the series 1-1+1-1+1-1+\cdots can be thought to
converge to 1/2. It is also possible that if you apply the Cesaro
process, the new sequence still diverges, but less wildly, so that if
you apply it again it now converges.

Let’s see how this works with 1-2+3-4+5-6+\cdots. The partial sum
sequence is 1,-1,2,-2,3,-3,\ldots and the Cesaro sequence is
1,0,2/3,0,3/5,0,\ldots, which obviously diverges. In fact, it is
asymptotically 1/2,0,1/2,0,1/2,0,\ldots. It is not hard to show that
if two sequences are asymptotically equivalent, so are their Cesaro
sequences. If you apply the process to the latter, you get
1/2,1/4,1/3,1/4,3/10,1/4. All the even numbered terms are 1/4,
while the term of index 2k+1 is
\frac{(k+1)/2}{2k+1}=\frac{k+1}{4k+2}=\frac{1+1/k}{4+2/k} which
converges to 1/4. So the second Cesaro process converges to 1/4.

What does this do for us? Well, if you take an s<-1 (I will restrict
to real values of s for convenience). The series converges to
\eta(s). If you apply the Cesaro process to it, it still converges to
\eta(s) since the process doesn’t change the value of a convergent
seqeunce. Apply it a second time and get another sequence that still
converges to \eta(s). But this second sequence, no matter how
complicated it is (and it will be a mess), converges to 1/4 when you
put in s=-1. Since, as we saw above, -3c=\eta(1), we conclude that
\zeta(-1)=-1/12.

Does this mean that 1+2+3+\cdots = -1/12. No, it doesn’t. It is a
game you can play with divergent series, really signifying nothing.
Incidentally, you might wonder what happens when you apply the Cesaro
process to that sequence. The point is that the original sequence is
actually convergent–to \infty --and the Cesaro process cannot change
that for the same reason that applies to any convergent sequence.

That “illegitimate computation”, including the Abel sum of the alternating series, does appear in Ramanujan’s first latter to Hardy.

However NB what he states in “Entry 1” is, for a sufficiently smooth function and presumably other unstated assumptions,

\sum_{k=1}^x f(k) = c + \int_0^x f(t)\,dt + \tfrac{1}{2}f(x) + \sum_{k=1}^{\infty}\frac{B_{2k}}{(2k)!}f^{(2k-1)}(x)

so the “constant” of the series should be

c = -\tfrac{1}{2}f(0) - \sum_{k=1}^\infty \frac{B_{2k}}{(2k)!}f^{(2k-1)}(0).

One can plug in f(t)=t, for example.

FWIW, I checked the facsimile of one of the relevant notebooks (the one where the following material is labelled Chapter VIII on page 40), and it says, modulo any transcription errors,

So nothing here about analytic continuation, but he does explicitly mention finding the constant term of an asymptotic expansion; (see post #58).