Summation of n-squared, cubed, etc. How do you in general derive a formula for summation of n-squared, n-cubed, etc...? Clear explanation with reference would be great.

Let $\displaystyle S(n;m) = \sum_{k=1}^n k^m$. Now consider
$$(k+1)^{m+1} - k^{m+1} = \sum_{l=0}^m \dbinom{m+1}{l} k^l$$
Now telescopic summation gives
$$(n+1)^{m+1} - 1 = \sum_{l=0}^m \dbinom{m+1}{l} \left(\sum_{k=1}^nk^l \right) = \sum_{l=0}^m \dbinom{m+1}{l} S(n;l)$$
$(1)$ Take $m=0$ and get $S(n;0)$.
$(2)$ Take $m=1$, use $S(n;0)$ and get $S(n;1)$.
$(3)$ Take $m=2$, use $S(n;0),S(n;1)$ and get $S(n;2)$.
$(4)$ Take $m=3$, use $S(n;0),S(n;1),S(n;2)$ and get $S(n;3)$.
$(5)$ And so on...
