How can the following be calculated? How can the following series be calculated?
$$S=1+(1+2)+(1+2+3)+(1+2+3+4)+\cdots+(1+2+3+4+\cdots+2011)$$

Note that $1$ occurs $2011$ times; $2$ occurs $2010$ times; $3$ occurs $2009$ times, and so on, until $2011$ occurs only once. Hence we can rewrite the sum as
$$(2012-1)(1)+(2012-2)(2)+(2012-3)(3)+\cdots+(2012-2011)(2011).$$
Split and regroup terms:
$$2012(1+2+3+\cdots+2011)-(1^2+2^2+3^2+\cdots+2011^2).$$
Now using the two formulas for triangular numbers and square pyramidal numbers, compute
$$2012\frac{2011(2011+1)}{2}-\frac{2011(2011+1)(2\cdot2011+1)}{6}=1357477286.$$

This also evaluates the general sum:
$$1+(1+2)+\cdots+(1+2+\cdots+n)$$
$$=(n+1-1)(1)+(n+1-2)(2)+\cdots+(n+1-n)(n)$$
$$=(n+1)(1+2+\cdots+n)-(1^2+2^2+\cdots+n^2)$$
$$=(n+1)\frac{n(n+1)}{2}-\frac{n(n+1)(2n+1)}{6}=n(n+1)\left[\frac{n+1}{2}-\frac{2n+1}{6}\right]$$
$$=\frac{n(n+1)(n+2)}{6}.$$
One could also use the triangle number formula on each term for a more direct route:
$$\frac{1(1+1)}{2}+\frac{2(2+1)}{2}+\frac{3(3+1)}{2}+\cdots+\frac{n(n+1)}{2}$$
$$=\frac{1}{2}\left[(1+2^2+\cdots+n^2)+(1+2+\cdots+n)\right]$$
$$=\frac{1}{2}\left[\frac{n(n+1)(2n+1)}{6}+\frac{n(n+1)}{2}\right]=\frac{n(n+1)}{4}\left[\frac{2n+1}{3}-1\right]$$
$$=\frac{n(n+1)(n+2)}{6}.$$
