Can one differentiate a series after taking its limit? I made a post in my blog to show that $1+2+3+\cdots=-\frac{1}{12}$. 
However a visitor of my blog commented that I can not differentiate an expression after taking its limit. Is that statement true? would that make the proof wrong?
 A: If
$$
f(x) = \sum_{n=0}^{\infty} a_nx^n
$$
on an interval $I$, then it is true that
$$
f'(x) = \sum_{n=1}^{\infty} a_n n x^{n-1}.
$$
So indeed you can take derivatives. However: You have that
$$
\frac{1}{1-x} = \sum_{n=0}^{\infty} x^n
$$
on the interval $(-1, 1)$. The identity is not true for $x = -1$. So you do have that
$$
\frac{d}{dx} \frac{1}{1-x} = \sum_{n=1}^{\infty} nx^{n-1}
$$
and this is tru on the interval $(-1,1)$. It isn't true for $x=-1$. Hence your proof of your Theorem 1 isn't correct.
A: Your post can be justified by using formal power series rather than actual infinite sums. It doesn't really work at all with typical analysis, because we would be forced to conclude that everything diverges anyways in that case and it's awful silly of a commenter to be arguing about derivatives when nothing in the post can be adequately addressed with limits. So, if we want to proceed, it is to our advantage to consider the series
$$a_0+a_1x+a_2x^2+a_3x^3+\ldots$$
only algebraically, without referencing convergence or divergence - and we may consider that this series naturally extends forever, without referencing any partial sums or truncations of the series. That is, we put aside the idea that this is a function of a real number $x$, and just use algebraic rules (sums and products) to play with it.
Such series come with their own version of the derivative, where we define formal derivative of the above as
$$a_1+2a_2x+3a_3x^2+\ldots.$$
One may notice that this derivative satisfies the ordinary rules for addition, products, and composition, and we may treat it accordingly. Notice in particular that the derivative of $x^n$ is $nx^{n-1}$. Now, none of this arise from analysis and we must be a little careful: it is not perfectly clear what significance results obtained this way have when you use this in ways that are not valid in analysis. However, given that most of the time, when you see a particular value assigned to a divergent series, it arises as some sort of analytic continuation of a series to a place where it doesn't converge, we are extremely interested when such methods yield a analytic result valid near $x=0$ - which yours is. If that sentence makes no sense to you: Sorry. But this is basically where the value $1+2+3+\ldots =\frac{-1}{12}$ comes from - we take a series, valid somewhere, consider it as a special type of function, and ask for the function's value somewhere that the series is not valid. Formal manipulations often are able to capture the leap made when we move from working with series locally, to working with functions globally.
The first bit of your argument, using this machinery, can be written somewhat like this - I intentionally avoid using division because it is not immediately obvious how division works with formal power series.

We start with the identity
  $$(1+x+x^2+x^3+x^4+\ldots)(1-x)=1$$
  which is clear from expanding the left side as as:
  $$\begin{align*}1&+x+x^2+x^3+\ldots\\ & -x-x^2 -x^3-\ldots \end{align*}. $$
  Applying the derivative to the identity and using the product rule yields:
  $$(1+2x+3x^2+4x^3+\ldots)(1-x) - (1+x+x^2+x^3+x^4+\ldots) = 0$$
  and if we multiply through by $(1-x)$ we get the identity:
  $$(1+2x+3x^2+4x^3+\ldots)(1-x)^2 - (1+x+x^2+x^3+x^4+\ldots)(1-x) = 0$$
  and noting that $(1+x+x^2+x^3+x^4+\ldots)(1-x)=1$ by the first equation we get
  $$(1+2x+3x^2+4x^3+\ldots)(1-x)^2 = 1$$

At which point we could plug in $x=-1$ and obtain the value $\frac{1}4$ for the desired series by manipulating algebraically. We reach this conclusion without appealing to limits at all - and can find that, in so far as the notion of sums of divergent series is well-defined - the value of the one in question is $\frac{1}4$.
