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.

Start with:
$$
\sum_{0 \le k \le n} z^k = \frac{1 - z^{n + 1}}{1 - z}
$$
If you do:
$$
\left( z \frac{d}{d z} \right)^m \sum_{0 \le k \le n} z^k
  = \sum_{0 \le k \le n} k^m z^k
$$
Compute the derivative, evaluate at $z = 1$ (you will need to apply l'Hôpital for the derivative at the right hand side as a limit) and you have the sum of the first $m$-th powers.
Another way is to apply the Euler-Maclaurin formula to the sum of $n^m$, which gives:
$$
\sum_{0 \le k \le n} n^m
  = \frac{1}{m + 1}
          \left(
            \sum_{0 \le k \le m}
              \binom{m + 1}{k} \, B_k n^{m + 1 - k}
          \right)
$$
Here the $B_k$ are the Bernoulli numbers.
