Was $1+2+3+\cdots=-\frac{1}{12}$ in Ramanujan's letter?

In the letter Ramanujan wrote to Hardy did he say that $1+2+3+\cdots=-\frac{1}{12}$. I have been hearing this ridiculous statement for some time now. And now people say that Ramanujan wrote it. Is it true?

• Proper MathJax usage would be $1+2+3+\cdots= - \frac 1{12}$ rather than $1+2+3...=-\frac 1{12}$. $\qquad$ Commented Jun 11, 2016 at 16:38
• If $s>1$ then Riemann's zeta function is $$\zeta(s) = \sum_{n=1}^\infty \frac 1 {n^s}, \tag 1$$ and substitution of $-1$ for $s$ in that equality yields $$\zeta(-1) = 1+2+3+\cdots.$$ But that substitution yields a series that does not converge. However, by analytic continuation of $(1)$, it turns out that $\zeta(-1) = -1/12$. $\qquad$ Commented Jun 11, 2016 at 16:42

Ramanujan did write down the expression in his first notebook as shown here. For a quick overview of this series, John Baez's lecture notes are a good starting point. These notes suggest that Ramanujan's observation goes back to Euler, though I have only seen the related alternating series $1 - 2 + 3 - 4 \dots = \frac{1}{4}$ mentioned in Euler's publications (see E352).

• But the question is not whether Ramanujan wrote it in his notebook, but whether he wrote it in his famous letter to Hardy. Commented Jun 4, 2016 at 15:05
• @Gerald Edgar, thanks for pointing that out. The answer appears to be yes, the formula is mentioned in his first letter to Hardy: see page 30 of Ramanujan: Letters and Commentary. Commented Jun 4, 2016 at 15:26
• Nice reference. Of course we should note that before Ramanujan gives these sums, he says that the series are divergent. And after he does it, he notes that there is required a discussion of when to use them and when not. When written without these two additional parts, the sum is (as the OP said) ridiculous. Commented Jun 4, 2016 at 18:13
• I have read in multiple papers that Euler did derive this sum using the alternating zeta function and its relationship to the zeta function. Commented Jun 15, 2016 at 9:08

Here is the relevant text from Ramanujan's second letter to G. H. Hardy, dated 27 February 1913 :

Dear Sir, I am very much gratified on perusing your letter of the 8th February 1913. I was expecting a reply from you similar to the one which a Mathematics Professor at London wrote asking me to study carefully Bromwich's Infinite Series and not fall into the pitfalls of divergent series. … I told him that the sum of an infinite number of terms of the series: 1 + 2 + 3 + 4 + · · · = −1/12 under my theory. If I tell you this you will at once point out to me the lunatic asylum as my goal. I dilate on this simply to convince you that you will not be able to follow my methods of proof if I indicate the lines on which I proceed in a single letter. …

He did say that in his second letter to Hardy, and as it turned out, it is not so ridiculous after all. This sum is being used in physics like in string theory.