Need help understanding a paragraph from a book "If in the obvious equalities $(k+1)^3−k^3=3k^2+3k+1$, for the different values $k=1,2,…,n−1$, we add the left and the right sides separately, we obtain the equation $n^3−1=3σ_n+\frac{3(n−1)n}{2}+n−1$, where $σ_n=1^2+2^2+…+(n−1)^2$."
I'm stuck trying to understand what the author has done in the paragraph below. Is it possible to explain it using high school-level math? For instance, what is meant with "for the different values $k=1,2,…,n−1$, we add the left and the right sides separately"? I don't understand what he does after that either.
 A: This equality 
$$(k+1)^3−k^3=3k^2+3k+1,$$
is true for every $k$, in particular it is true when $k=1$,$k=2$,etc... Writing all these equations, we get
$$\begin{array}{rcl}
(1+1)^3−1^3&=&3\cdot 1^2+3\cdot 1+1\\
(2+1)^3−2^3&=&3\cdot 2^2+3\cdot 2+1\\
&\vdots &\\
((n-2)+1)^3−(n-2)^3&=&3\cdot (n-2)^2+3\cdot (n-2)+1\\
((n-1)+1)^3−(n-1)^3&=&3\cdot (n-1)^2+3\cdot (n-1)+1\\
\end{array}$$ 
Then you just sum all these equations (right hand sides with right hand sides, left hand sides with left hand sides) to find 
$$\color{red}{2^3}-1^3+\color{blue}{3^3}-\color{red}{2^3}+4^3-\color{blue}{3^3}+\ldots +\color{green}{(n-1)^3}−(n-2)^3+n^3−\color{green}{(n-1)^3} = n^3-1$$
for the left hand side (note that this is called a telescopic sum). Now for the other side of the equation, note that
$$3\cdot 1^2 + 3 \cdot 2^2+ \ldots +3\cdot (n-2)^2+3\cdot (n-1)^2 = 3 \sigma_n$$
where $σ_n=1^2+2^2+…+(n−1)^2.$ Furthermore
$$3\cdot 1 + 3 \cdot 2+ \ldots +3\cdot (n-2)+3\cdot (n-1)= 3(1+2+\ldots +(n-1)) = 3\frac{n(n-1)}{2}. $$
(see the note for a proof of this fact) and
$$\underbrace{1+ 1+\ldots +1 + 1}_{(n-1) \text{ times}} = n-1.$$ So you finally get
$$n^3−1=3σ_n+\frac{3(n−1)n}{2}+n−1$$
NOTE: For any $k \in \mathbb{N},$ we have
$$\begin{array}{rcl}2(1+2+\ldots+(k-1)+k) &=& (1+2+\ldots+k)+(k+(k-1)+\ldots+2+1)\\ &=& (1+k)+(2+(k-1))+\ldots +((k-1)+2)+(k+1)\\ &=& k(k+1)\end{array}$$
A: It's a concise way of explaining the following:
We wish to calculate $\displaystyle \sum_{i=1}^ni^2$ by considering $S_n =\displaystyle \sum_{i=1}^n i^3$, and we know (by evaluating) that $(k+1)^3 - k^3 = 3k^2 + 3k+ 1$
So $$S_n - S_{n-1}= 1+\sum_{i=1}^{n-1} (i+1)^3 - i^3 = \sum_{i=1}^{n-1} 3i^2+ 3i +1 = 3\sigma_n + \frac{3n(n-1)}2 + n$$
But equally, $S_n - S_{n-1} = n^3$ by cancelling terms:$$S_n - S_{n-1} = 1+\sum_{i=1}^{n-1} (i+1)^3 - i^3 = 1+n^3 - \left ( (n-1)^3 - (n-1)^3\right ) + \ldots + \left (2 - 2\right) - 1=n^3$$
A: He performed a summation over the given value of k on each side. You may want to look into series to get a clearer idea.
