We are given an integer $n\geq 3$. Our goal is to partition $n$ into $k$ parts $p_1, p_2, \ldots, p_k$ with $p_1 + p_2 + \ldots + p_k = n$ (for an arbitrary $k$ we can choose) so as to maximize the product $p_1\cdot p_2\cdot\ldots\cdot p_k$. The question is, what is the optimal partition? Formally stated, we want to maximize $$\prod_{i = 1}^k p_i$$ under the constraints $p_i\in\mathbb{N}$ and $\sum_{i=1}^{k}p_i = n$.
Now, as an approximation we can analyze the case where we allow the parts to be real (and have a fractional number of parts). We can first prove that the parts should be all equal (since for any $a, b\in R$ we have $(\frac{a+b}{2})^2 \geq ab$, which we can derive from the AM-GM inequality). Then, we can simply analyze the function $f(x) = (\frac{n}{x})^x$ and show that in the optimal case we have $x = \frac{n}{e}$, that is, we split $n$ into $\frac{n}{e}$ parts, each of size $e$.
Let us now go back to the problem without the relaxation. I have seen stated without a proof that the optimal way to divide $n$ is to partition it into parts, all of size three (except if $n$ is not divisible by three than we may need one or two parts of size two at the end).
Now, the derivation for the continuous case above gives some intuition for why that would be the case, however it's definitely not a proof. For example, I could imagine that an optimal solution would be to have some parts of size two and some of size three, so as to make the average part size as close to $e$ as possible. How would I go about proving that simply maximizing the number of parts of size three is optimal?