Show, using the formulas for sums of fourth powers and squares, that
$$
\begin{aligned}
\sum_{i=1}^{n-1}\left(n^{4}-2 n^{2} i^{2}+i^{4}\right) &=\frac{8}{15}(n-1) n^{4}+\frac{1}{30} n^{4}-\frac{1}{30} n \\
&=\frac{8}{15} n \cdot n^{4}-\frac{1}{2} n^{4}-\frac{1}{30} n
\end{aligned}
$$