The solution is rather straightforward.
Since $n(n + 1)(2n + 1)/6=1^2+2^2+\cdots n^2,$ we wish to "concatenate" $k$ distinct pair of summands.
Indeed, we can do so: since $n\geq 20k$ we can find $x_1<x_2<\cdots<x_k$ such that $\forall i, \ 4x_i\leq n<5x_i.$ (in other words, there are at least $k$ integers $m$ satisfying $n/5<m\leq n/4,$ and we choose them) Furthermore, notice that we have \[3x_1<3x_2<\cdots<3x_n\leq\frac{3n}{4}<\frac{4n}{5}<4x_1<4x_2<\cdots <4x_n.\]Therefore, we can remove $(3x_i)^2$ and $(4x_i)^2$ from the sum, and replace them with $(5x_i)^2$ for each $1\leq i\leq k.$ Doing so, we get rid of precisely $k$ terms, without changing the sum, hence finding the $n-k$ desired summands.