<s>[INST] Finding the maximum value of the sum of the product of sets of 3 variables given their sum Given $x_{1}+x_{2}+...+x_{2014}=2014$, what is the maximum value of: $x_{1}.x_{2}.x_{3}+x_{2}.x_{3}.x_{4}+x_{3}.x_{4}.x_{5}+...+x_{2012}.x_{2013}.x_{2014}$.
It looks like an application of AM-GM inequality on terms obtained after proper rearranging of the given objective function or restriction, but do not find clear what such rearrangement could be. 
 [/INST] $$\begin{align}
\text{Objective} &= x_{1}.x_{2}.x_{3} + x_{2}.x_{3}.x_{4}+x_{3}.x_{4}.x_{5}+...+x_{2012}.x_{2013}.x_{2014} \\
&\leqslant (x_1 + x_4 + \dots+x_{2014})(x_2 + x_5 + \dots+x_{2012})(x_3 + x_6 + \dots+x_{2013}) \\
&\leqslant \left(\frac{x_1 + x_2 + x_3 + \dots + x_{2014}}{3} \right)^3  =\left( \frac{2014}3 \right)^3
\end{align}$$
However this bound is achieved for e.g. when $x_4 = x_5 = x_6 = \frac{2014}3$ and all other $x_i$ are zero, hence this is the maximum.
</s>