Am I understanding induction correctly? Here is an induction proof that I have written for my homework and I want to know if I am understanding this correctly:
Prove that for:
$ \sum\limits_{i=0}^n i^2 = \frac{n(n+1)(2n+1)}{6}$
My proof:
Check the base-case, let mine be n=1 (or do I have to choose 0..? The lowest one)
$ (1^2) = \frac{1^2(1^2+1)(2 \cdot 1^2 +1)}{6} = \frac{6}{6} = 1 $
Base case proved.
Induction step. Assume that
$ (1^2+2^2=3^2...k^2) = \frac{k(k+1)(2k+1)}{6} $
works for all k.
Add another sum, $k+1$, then:
$(1^2+2^2=3^2...+k^2+(k+1)^2) = \frac{k(k+1)(2k+1)}{6}+(k+1) $
Substitude for  sum up until $(k+1)^2$
$ \frac{k(k+1)(2k+1)}{6}+(k+1)^2 = \frac{k(k+1)(2k+1)}{6}+(k+1) $
Re-arrange and tidy up:
$ \frac{(k^2+k)(2k+1)+6k+6}{6} = \frac{(k^2+k)(2k+1)(6k+6}{6} $
Therefore we have proven that it works for $i=1$ and as it works for any $k+1$ it must work for the rest.
Is this correctly executed and understood?
EDIT: As my method seems to be wrong, let me have another try:
Now with:
$ \sum\limits_{i=0}^n i^2 = \frac{n(n+1)(2n+1)}{6}$
$(1^2+2^2=3^2...+k^2+(k+1)^2) = \frac{(k+1)((k+1)+1)(2(k+1)+1)}{6} $
Re arrange and fiddle:
$2n^3+9n^2+13n+6 = 2n^3+9n^2+13n+6$
Is this correct?

If it is to be shown by induction that $$\sum_{i=0}^{n}f\left(i\right)=g\left(n\right)$$
then $f\left(0\right)=g\left(0\right)$ must be proved (the base case) and
secondly it must be shown that: $$\sum_{i=0}^{n+1}f\left(i\right)=g\left(n+1\right)$$
on base of: $$\sum_{i=0}^{n}f\left(i\right)=g\left(n\right)$$
That amounts in showing that: $$g(n)+f\left(n+1\right)=g\left(n+1\right)$$
Note that here: $$g(n)+f\left(n+1\right)=\sum_{i=0}^{n+1}f\left(i\right)$$
In your case that comes to proving that: $$\frac{1}{6}n\left(n+1\right)\left(2n+1\right)+\left(n+1\right)^{2}=\frac{1}{6}\left(n+1\right)\left(n+2\right)\left(2n+3\right)$$
