Prove by induction, the following: $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}6$$ So this is what I have so far:
We will prove the base case for $n=1$: $$\sum_{k=1}^1 1^2 = \frac{1(1+1)(2(1)+1)}6$$ We can see this is true because $1=1$.
Using induction we can assume the statement is true for $n$, we want to prove the statement holds for the case $n+1$: \begin{align*} \sum_{k=1}^{n+1} k^2 :& =\sum_{k=1}^n k^2 + (n+1)^2\\ & = \frac{n(n+1)(2n+1)}6 + (n+1)^2 && \text{by I.H}\\ & = \frac{(n+6)(2n+1)(n+1)^3}6 && \text{algebra} \end{align*}
This is as far as I have gotten in the proof I know that I am almost there, but I am wondering if I missed a step or did the algebra wrong. I know that what I'm supposed to get is $\frac{(n+1)(n+2)(2n+3)}6$ or is that incorrect too? This should be fairly simple, but for some reason it just isn't working for me.