TITLE: How do I manipulate the sum of all natural numbers to make it converge to an arbitrary number?
QUESTION [10 upvotes]: I just found out that the Riemann Series Theorem lets us do the following:
$$\sum_{i=1}^\infty{i}=-\frac{1}{12}$$But it also says (at least according to the wikipedia page on the subject) that a conditionally convergent sum can be manipulated to make it look like it converges into any real number. My question is then: Is there a general algorithm for manipulating this series into an arbitrary number?
My knowledge about series and number theory is pretty limited so if I'm in over my head or if the answer is just too complicated I'd appreciate some tips on what to read up on!
Thanks!

REPLY [4 votes]: The Riemann series theorem does not allow you to make the claim above because 
$ \sum_{n=1}^{\infty} n$
 is not a conditionally convergent series. 
Instead, an amazing but customary abuse of notation is used  to write down this "identity". There is a function called the Riemann Zeta Function which is defined for every complex number except $s=1$. If $s$ has real part greater than $1$, the value of the Riemann zeta function equals
$$
\zeta(s)=\sum_{n=1}^\infty \frac{1}{n^s}.
$$
The Riemann zeta function also has
$$
\zeta(-1)=\frac{-1}{12}.
$$
Filling in $s=-1$, we get
$$
\zeta(-1)``=''\sum_{n=1}^\infty n,
$$
but this should not be taken too literally because the sum only converges when $s$ has real part greater than $1$ and does not hold if $s=-1$.