Can anybody solve this:
For a constant positive integer $n\geq6$ find $k$ and positive integers $a_{1},a_{2},...,a_{k}$ that maximize the expression
$$\sum_{i=1}^{k}\left[-4a_{i}^{3}+\left(3n-3\right)a_{i}^{2}+\left(3n+1\right)a_{i}\right],$$ with $a_{1}+a_{2}+\dots+a_{k}=n$.
Some of my experimental results shows that the optimal solution is attained at $k=3$, with $a_{1},a_{2},a_{3}$ roughly equal to $\frac{n}{3}$.