I was reading Ramanujan's letter to Hardy and came across this identity: $$0!-1!+2!-3!+...=0.596...$$ Ramanujan didn't give the exact value of that constant, but it is the Euler-Gompertz constant, as stated in the comments. This seems nonsensical, but in fact, this makes sense, if we study some methods of "forcing divergents to converge". For example, $1+2+3+....$ is $-1/12$ because $\zeta(-1)$ is $-1/12$. But I can't prove why this is true. So my question is:
- How can this be proved?
Sorry if this question is stupid.
The answer is a little bit buried in one of the formulas in the Wikipedia article for the Euler-Gompertz constant:
$$G = \int_0^{\infty} \frac{e^{-x}}{1 + x} \, dx.$$
This integral can be expanded formally into a divergent series as follows. We have
$$\int_0^{\infty} \frac{e^{-x}}{1 + x} \, dx = \int_0^{\infty} \sum_{n \ge 0} (-1)^n x^n e^{-x} \, dx "=" \sum_{n \ge 0} (-1)^n \int_0^{\infty} x^n e^{-x} \, dx$$
(the equal sign being in quotes because the exchange of sum and integral here is not actually justified) and the integral defining the Gamma function gives
$$\int_0^{\infty} x^n e^{-x} \, dx = n!.$$
This can be proven pretty straightforwardly by induction on $n$ using integration by parts, and there is also a cute generating function proof. So, formally, we get $G "=" \sum_{n \ge 0} (-1)^n n!$. (I consider it quite misleading to use ordinary equality to talk about sums of divergent series.)