<s>[INST] relation between arithmetic series and `square` arithmetic series For example:
$$1+2+\text{...}+n=\frac{n(n+1)}{2}~~~(1)$$
$$1^2+2^2+\text{...}+n^2=\frac{n(n+1)(2n+1)}{6}~~~(2)$$
In this equality, I sometimes recall by heart
$\frac{n(2n+1)(2n+3)}{6}$ or others.
Why I cannot memorize some formulas exactly over these years?
Question1

How to derive $\frac{n(n+1)(2n+1)}{6}$ from $1^2+2^2+\text{...}+n^2$?
Question2

Now I happen to notice that $n(n+1)$ are the same to the summation in
$1+2+\text{...}+n=\frac{n(n+1)}{2}$
What's the relation between (1) and (2).
I think there must be large materials about more general cases
$$\sum _{i=0}^n i^k\text{   },k=1,2,\text{...},n~~~(3)$$
What's the formal terminology about that?
 [/INST] As $(r+1)^{k+1}-r^{k+1}=\binom{k+1}1r^k+ \binom{k+1}2r^{k-1}+\cdots+\binom{k+1}{k-1}r^2+\binom{k+1}kr+1$
Putting $r=1,2,3,\cdots,n-1,n$ and adding them we get
$$(n+1)^{k+1}-1=\binom{k+1}1S_k+\binom{k+1}2S_{k-1}+\cdots+\binom{k+1}{k-1}S_2+\binom{k+1}kS_1+S_0 $$ where $S_k=\sum_{1\le r\le n}r^k$
Now, $S_0=\sum_{1\le r\le n}1=n$
Putting $k=1,(n+1)^2-1=\binom21S_1+S_0$ which will give us $S_1$ as we know $S_0$ 
Putting $k=2,(n+1)^3-1=\binom31S_2+\binom32S_1+S_0$  which will give us $S_2$ as we know $S_0,S_1$ 
and so on
</s>