<s>[INST] Mistake in proof for sequence of cubes I know there are thousands of proofs for this to have a look at, but I started one myself in a slightly different way than what is easily found when googling. To me, the proof seems like it should work, but the result is not what it should be
$$\begin{align}
    \sum_{k=0}^n k^3 & = \sum_{k=0}^n (n-k)^3 \\
    & = \sum_{k=0}^n (n^3 -3n^2k + 3nk^2 - k^3) \\
    & = (n+1)n^3 - 3n^2\frac{n(n+1)}{2} + 3n\frac{n(2n+1)(n+1)}{6} - \sum_{k=0}^n k^3\\
    \Rightarrow 2 \sum_{k=0}^n k^3 & = \frac{2n^3(n+1)}{2} - \frac{3n^3(n+1)}{2} + \frac{(2n^3 + n^2)(n+1)}{2} \\
    \Rightarrow \sum_{k=0}^n k^3 & = \frac{(n^3 + n^2)(n+1)}{4}
\end{align}$$
I realise it might be easier or something like that when considering a sum starting from $k=1$ (that is what everyone seems to be doing in any case), but I thought it should work like this as well. Did I make any mistake throughout my proof or forget something? I assume it is provable like this...
 [/INST] You are correct. Just take $n^2$ common from the first parenthesis.
$$\frac{(n^3 + n^2)(n+1)}{4} = \frac{n^2(n+1)^2}{4} = \left(\frac{n(n+1)}{2}\right)^2$$
</s>