For any integer $n\geq2$, prove that $\displaystyle\sum\limits_{i=1}^{n-1}i(i+1) = \frac{n(n-1)(n+1)}{3}.$
Let $P(n)$ be the formula $\displaystyle\sum\limits_{i=1}^{n-1}i(i+1) = \frac{n(n-1)(n+1)}{3}.$
$P(2)$ is true since $\displaystyle\frac{2\cdot1\cdot3}{3}=2.$
$P(k)$ gives $\displaystyle\sum\limits_{i=1}^{k-1}i(i+1) = \frac{k(k-1)(k+1)}{3}.$
We wish to show that $P(k+1)$ = $\displaystyle\sum\limits_{i=1}^{k}i(i+1) = \frac{k(k+1)(k+2)}{3}$ is true.
From the left hand side,
\begin{align}\displaystyle\sum\limits_{i=1}^{k}i(i+1) &= \displaystyle\sum\limits_{i=1}^{k-1}i(i+1) + (k+1)((k+1)+1) \\ &=\displaystyle\frac{k(k-1)(k+1)}{3}+(k+1)(k+2) \\ \end{align}
I'm pretty sure I messed up somewhere already, as after all the algebra, I can't have show it of the form $P(k+1)$. How do you these types of inductions? Where is my error? Thanks.