# 1 + 2 + 3 + 4 + ⋯

The infinite series whose terms are the natural numbers 1 + 2 + 3 + 4 + ⋯ is a divergent series. The nth partial sum of the series is the triangular number
$\sum _{k=1}^{n}k={\frac {n(n+1)}{2}},$
which increases without bound as n goes to infinity. Because the sequence of partial sums fails to converge to a finite limit, the series does not have a sum.
Although the series seems at first sight not to have any meaningful value at all, it can be manipulated to yield a number of different mathematical results. For example, many summation methods are used in mathematics to assign numerical values even to a divergent series. In particular, the methods of zeta function regularization and Ramanujan summation assign the series a value of ⁠−+1/12⁠, which is expressed by a famous formula:
$1+2+3+4+\cdots =-{\frac {1}{12}},$
where the left-hand side has to be interpreted as being the value obtained by using one of the aforementioned summation methods and not as the sum of an infinite series in its usual meaning. These methods have applications in other fields such as complex analysis, quantum field theory, and string theory.
In a monograph on moonshine theory, University of Alberta mathematician Terry Gannon calls this equation "one of the most remarkable formulae in science".

## Partial sums

The partial sums of the series 1 + 2 + 3 + 4 + 5 + 6 + ⋯ are 1, 3, 6, 10, 15, etc. The nth partial sum is given by a simple formula:
$\sum _{k=1}^{n}k={\frac {n(n+1)}{2}}.$
This equation was known to the Pythagoreans as early as the sixth century BCE. Numbers of this form are called triangular numbers, because they can be arranged as an equilateral triangle.
The infinite sequence of triangular numbers diverges to +∞, so by definition, the infinite series 1 + 2 + 3 + 4 + ⋯ also diverges to +∞. The divergence is a simple consequence of the form of the series: the terms do not approach zero, so the series diverges by the term test.

## Summability

Among the classical divergent series, 1 + 2 + 3 + 4 + ⋯ is relatively difficult to manipulate into a finite value. Many summation methods are used to assign numerical values to divergent series, some more powerful than others. For example, Cesàro summation is a well-known method that sums Grandi's series, the mildly divergent series 1 − 1 + 1 − 1 + ⋯, to ⁠1/2⁠. Abel summation is a more powerful method that not only sums Grandi's series to ⁠1/2⁠, but also sums the trickier series 1 − 2 + 3 − 4 + ⋯ to ⁠1/4⁠.
Unlike the above series, 1 + 2 + 3 + 4 + ⋯ is not Cesàro summable nor Abel summable. Those methods work on oscillating divergent series, but they cannot produce a finite answer for a series that diverges to +∞. Most of the more elementary definitions of the sum of a divergent series are stable and linear, and any method that is both stable and linear cannot sum 1 + 2 + 3 + ⋯ to a finite value (see § Heuristics below). More advanced methods are required, such as zeta function regularization or Ramanujan summation. It is also possible to argue for the value of ⁠−+1/12⁠ using some rough heuristics related to these methods.

### Heuristics

Srinivasa Ramanujan presented two derivations of "1 + 2 + 3 + 4 + ⋯ = ⁠−+1/12⁠" in chapter 8 of his first notebook. The simpler, less rigorous derivation proceeds in two steps, as follows.
The first key insight is that the series of positive numbers 1 + 2 + 3 + 4 + ⋯ closely resembles the alternating series 1 − 2 + 3 − 4 + ⋯. The latter series is also divergent, but it is much easier to work with; there are several classical methods that assign it a value, which have been explored since the 18th century.
In order to transform the series 1 + 2 + 3 + 4 + ⋯ into 1 − 2 + 3 − 4 + ⋯, one can subtract 4 from the second term, 8 from the fourth term, 12 from the sixth term, and so on. The total amount to be subtracted is 4 + 8 + 12 + 16 + ⋯, which is 4 times the original series. These relationships can be expressed using algebra. Whatever the "sum" of the series might be, call it c = 1 + 2 + 3 + 4 + ⋯. Then multiply this equation by 4 and subtract the second equation from the first:
${\begin{alignedat}{7}c=&&1+2&&+3+4&&+5+6+\cdots \\4c=&&4&&+8&&+12+\cdots \\c-4c=&&1-2&&+3-4&&+5-6+\cdots \end{alignedat}}$
The second key insight is that the alternating series 1 − 2 + 3 − 4 + ⋯ is the formal power series expansion (for x at point 0) of the function ⁠1/(1 + x)$^2$⁠ which is 1 − 2x + 3x^2 − 4x^3 + ⋯ evaluated with x defined as 1. Accordingly, Ramanujan writes
$-3c=1-2+3-4+\cdots ={\frac {1}{(1+1)^{2}}}={\frac {1}{4}}.$
Dividing both sides by −3, one gets c = ⁠−+1/12⁠.
Generally speaking, it is incorrect to manipulate infinite series as if they were finite sums. For example, if zeroes are inserted into arbitrary positions of a divergent series, it is possible to arrive at results that are not self-consistent, let alone consistent with other methods. In particular, the step 4c = 0 + 4 + 0 + 8 + ⋯ is not justified by the additive identity law alone. For an extreme example, appending a single zero to the front of the series can lead to a different result.
One way to remedy this situation, and to constrain the places where zeroes may be inserted, is to keep track of each term in the series by attaching a dependence on some function. In the series 1 + 2 + 3 + 4 + ⋯, each term n is just a number. If the term n is promoted to a function n$^{−s}$, where s is a complex variable, then one can ensure that only like terms are added. The resulting series may be manipulated in a more rigorous fashion, and the variable s can be set to −1 later. The implementation of this strategy is called zeta function regularization.

### Zeta function regularization

In zeta function regularization, the series ∑$_{n=1}$$^∞$n{\textstyle \sum _{n=1}^{\infty }n} is replaced by the series ∑$_{n=1}$$^∞$n$^{−s}$.{\textstyle \sum _{n=1}^{\infty }n^{-s}.} The latter series is an example of a Dirichlet series. When the real part of s is greater than 1, the Dirichlet series converges, and its sum is the Riemann zeta function ζ(s). On the other hand, the Dirichlet series diverges when the real part of s is less than or equal to 1, so, in particular, the series 1 + 2 + 3 + 4 + ⋯ that results from setting s = −1 does not converge. The benefit of introducing the Riemann zeta function is that it can be defined for other values of s by analytic continuation. One can then define the zeta-regularized sum of 1 + 2 + 3 + 4 + ⋯ to be ζ(−1).
From this point, there are a few ways to prove that ζ(−1) = ⁠−+1/12⁠. One method, along the lines of Euler's reasoning, uses the relationship between the Riemann zeta function and the Dirichlet eta function η(s). The eta function is defined by an alternating Dirichlet series, so this method parallels the earlier heuristics. Where both Dirichlet series converge, one has the identities:
${\begin{alignedat}{7}\zeta (s)&=&1^{-s}+2^{-s}&&+3^{-s}+4^{-s}&&+5^{-s}+6^{-s}+\cdots &\\2\times 2^{-s}\zeta (s)&=&2\times 2^{-s}&&+2\times 4^{-s}&&+2\times 6^{-s}+\cdots &\\\left(1-2^{1-s}\right)\zeta (s)&=&1^{-s}-2^{-s}&&+3^{-s}-4^{-s}&&+5^{-s}-6^{-s}+\cdots &=\eta (s).\end{alignedat}}$
The identity $(1-2^{1-s})\zeta (s)=\eta (s)$ continues to hold when both functions are extended by analytic continuation to include values of s for which the above series diverge. Substituting s = −1, one gets −3ζ(−1) = η(−1). Now, computing η(−1) is an easier task, as the eta function is equal to the Abel sum of its defining series, which is a one-sided limit:
$-3\zeta (-1)=\eta (-1)=\lim _{x\to 1^{-}}\left(1-2x+3x^{2}-4x^{3}+\cdots \right)=\lim _{x\to 1^{-}}{\frac {1}{(1+x)^{2}}}={\frac {1}{4}}.$
Dividing both sides by −3, one gets ζ(−1) = ⁠−+1/12⁠.

### Cutoff regularization

The method of regularization using a cutoff function can "smooth" the series to arrive at ⁠−+1/12⁠. Smoothing is a conceptual bridge between zeta function regularization, with its reliance on complex analysis, and Ramanujan summation, with its shortcut to the Euler–Maclaurin formula. Instead, the method operates directly on conservative transformations of the series, using methods from real analysis.
The idea is to replace the ill-behaved discrete series $\textstyle \sum _{n=0}^{N}n$ with a smoothed version
$\sum _{n=0}^{\infty }nf\left({\frac {n}{N}}\right),$
where f is a cutoff function with appropriate properties. The cutoff function must be normalized to f(0) = 1; this is a different normalization from the one used in differential equations. The cutoff function should have enough bounded derivatives to smooth out the wrinkles in the series, and it should decay to 0 faster than the series grows. For convenience, one may require that f is smooth, bounded, and compactly supported. One can then prove that this smoothed sum is asymptotic to ⁠−+1/12⁠ + CN$^2$, where C is a constant that depends on f. The constant term of the asymptotic expansion does not depend on f: it is necessarily the same value given by analytic continuation, ⁠−+1/12⁠.

### Ramanujan summation

The Ramanujan sum of 1 + 2 + 3 + 4 + ⋯ is also ⁠−+1/12⁠. Ramanujan wrote in his 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.
Ramanujan summation is a method to isolate the constant term in the Euler–Maclaurin formula for the partial sums of a series. For a function f, the classical Ramanujan sum of the series $\textstyle \sum _{k=1}^{\infty }f(k)$ is defined as
$c=-{\frac {1}{2}}f(0)-\sum _{k=1}^{\infty }{\frac {B_{2k}}{(2k)!}}f^{(2k-1)}(0),$
where f$^{(2k−1)}$ is the (2k − 1)th derivative of f and B$_{2k}$ is the (2k)th Bernoulli number: B$_2$ = ⁠1/6⁠, B$_4$ = ⁠−+1/30⁠, and so on. Setting f(x) = x, the first derivative of f is 1, and every other term vanishes, so
$c=-{\frac {1}{6}}\times {\frac {1}{2!}}=-{\frac {1}{12}}.$
To avoid inconsistencies, the modern theory of Ramanujan summation requires that f is "regular" in the sense that the higher-order derivatives of f decay quickly enough for the remainder terms in the Euler–Maclaurin formula to tend to 0. Ramanujan tacitly assumed this property. The regularity requirement prevents the use of Ramanujan summation upon spaced-out series like 0 + 2 + 0 + 4 + ⋯, because no regular function takes those values. Instead, such a series must be interpreted by zeta function regularization. For this reason, Hardy recommends "great caution" when applying the Ramanujan sums of known series to find the sums of related series.

### Failure of stable linear summation methods

A summation method that is linear and stable cannot sum the series 1 + 2 + 3 + ⋯ to any finite value. (Stable means that adding a term at the beginning of the series increases the sum by the value of the added term.) This can be seen as follows. If
$1+2+3+\cdots =x,$
then adding 0 to both sides gives
$0+1+2+3+\cdots =0+x=x$
by stability. By linearity, one may subtract the second equation from the first (subtracting each component of the second line from the first line in columns) to give
$1+1+1+\cdots =x-x=0.$
Adding 0 to both sides again gives
$0+1+1+1+\cdots =0,$
and subtracting the last two series gives
$1+0+0+0+\cdots =0,$
contradicting stability.
Therefore, every method that gives a finite value to the sum 1 + 2 + 3 + ⋯ is not stable or not linear.

## Physics

In bosonic string theory, the attempt is to compute the possible energy levels of a string, in particular, the lowest energy level. Speaking informally, each harmonic of the string can be viewed as a collection of D − 2 independent quantum harmonic oscillators, one for each transverse direction, where D is the dimension of spacetime. If the fundamental oscillation frequency is ω, then the energy in an oscillator contributing to the nth harmonic is nħω/2. So using the divergent series, the sum over all harmonics is −ħω(D − 2)/24. Ultimately it is this fact, combined with the Goddard–Thorn theorem, which leads to bosonic string theory failing to be consistent in dimensions other than 26.
The regularization of 1 + 2 + 3 + 4 + ⋯ is also involved in computing the Casimir force for a scalar field in one dimension. An exponential cutoff function suffices to smooth the series, representing the fact that arbitrarily high-energy modes are not blocked by the conducting plates. The spatial symmetry of the problem is responsible for canceling the quadratic term of the expansion. All that is left is the constant term −1/12, and the negative sign of this result reflects the fact that the Casimir force is attractive.
A similar calculation is involved in three dimensions, using the Epstein zeta-function in place of the Riemann zeta function.

## History

It is unclear whether Leonhard Euler summed the series to ⁠−+1/12⁠. According to Morris Kline, Euler's early work on divergent series relied on function expansions, from which he concluded 1 + 2 + 3 + 4 + ⋯ = ∞. According to Raymond Ayoub, the fact that the divergent zeta series is not Abel-summable prevented Euler from using the zeta function as freely as the eta function, and he "could not have attached a meaning" to the series. Other authors have credited Euler with the sum, suggesting that Euler would have extended the relationship between the zeta and eta functions to negative integers. In the primary literature, the series 1 + 2 + 3 + 4 + ⋯ is mentioned in Euler's 1760 publication De seriebus divergentibus alongside the divergent geometric series 1 + 2 + 4 + 8 + ⋯. Euler hints that series of this type have finite, negative sums, and he explains what this means for geometric series, but he does not return to discuss 1 + 2 + 3 + 4 + ⋯. In the same publication, Euler writes that the sum of 1 + 1 + 1 + 1 + ⋯ is infinite.

## In popular media

David Leavitt's 2007 novel The Indian Clerk includes a scene where Hardy and Littlewood discuss the meaning of this series. They conclude that Ramanujan has rediscovered ζ(−1), and they take the "lunatic asylum" line in his second letter as a sign that Ramanujan is toying with them.
Simon McBurney's 2007 play A Disappearing Number focuses on the series in the opening scene. The main character, Ruth, walks into a lecture hall and introduces the idea of a divergent series before proclaiming, "I'm going to show you something really thrilling", namely 1 + 2 + 3 + 4 + ⋯ = ⁠−+1/12⁠. As Ruth launches into a derivation of the functional equation of the zeta function, another actor addresses the audience, admitting that they are actors: "But the mathematics is real. It's terrifying, but it's real."
In January 2014, Numberphile produced a YouTube video on the series, which gathered over 1.5 million views in its first month. The 8-minute video is narrated by Tony Padilla, a physicist at the University of Nottingham. Padilla begins with 1 − 1 + 1 − 1 + ⋯ and 1 − 2 + 3 − 4 + ⋯ and relates the latter to 1 + 2 + 3 + 4 + ⋯ using a term-by-term subtraction similar to Ramanujan's argument. Numberphile also released a 21-minute version of the video featuring Nottingham physicist Ed Copeland, who describes in more detail how 1 − 2 + 3 − 4 + ⋯ = ⁠1/4⁠ as an Abel sum, and 1 + 2 + 3 + 4 + ⋯ = ⁠−+1/12⁠ as ζ(−1). After receiving complaints about the lack of rigour in the first video, Padilla also wrote an explanation on his webpage relating the manipulations in the video to identities between the analytic continuations of the relevant Dirichlet series.
In The New York Times coverage of the Numberphile video, mathematician Edward Frenkel commented: "This calculation is one of the best-kept secrets in math. No one on the outside knows about it."
Coverage of this topic in Smithsonian magazine describes the Numberphile video as misleading and notes that the interpretation of the sum as ⁠−+1/12⁠ relies on a specialized meaning for the equals sign, from the techniques of analytic continuation, in which equals means is associated with. The Numberphile video was critiqued on similar grounds by German mathematician Burkard Polster on his Mathologer YouTube channel in 2018, his video receiving 2.7 million views by 2023.