Show that 3 is the most efficient number. Given a constant $n$, construct a sequence of natural numbers $a_0, a_1, \ldots, a_k$ such that:


*

*$a_0 + a_1 + \cdots + a_k \leq n$

*$a_0 a_1 \cdots a_k$ is maximized


I conjecture that the solution is as follows:
Add $3$ to your sequence. Subtract $3$ from $n$. Repeat until the leftover is $2, 3, \text{or } 4$. If the leftover is $2$, end your sequence with a $2$; if the leftover is $3$, end your sequence with a $3$; and if the leftover is $4$, end your sequence with two $2$s.
To show this, I want to say that $3$ is the most digit-efficient number.
For all natural numbers $m > 1$, we can say:
$$3^m \geq m^3$$
Both the LHS and RHS of this inequality have a sequence sum of $3m$.
Is this enough to show that my solution is correct? I have a strong feeling that my proof is missing something (for example, the odd case of a leftover of $4$ isn't really "explained"), but I'm not sure what. How can I formalize what I've written, and what do I need to add to make it a comprehensive solution?

Just to clear up any questions about what this problem is asking, let's say $n = 11$. Then:
$$3+3+3+2 = 11$$
$$3*3*3*2 = 54$$
And $54$ is the highest number you can make. Here, the sequence in question is $\{3, 3, 3, 2\}$.
 A: If there is $a_i\gt4$, we have
$$
2(a_i-2)=2a_i-4\gt a_i\;,
$$
contradicting optimality. Thus $a_i\le4$ for all $i$. We can replace any $4$ by two $2$s without changing the constraint or the objective function. Also $1$s are obviously suboptimal.
Thus all $a_i$ are either $2$ or $3$. Any group of three $2$s can be improved on by replacing it by two $3$s. Since two $2$s are better than one $3$, it follows that the optimal solution is the one consisting of all $3$s and the unique number of zero to two $2$s to make the sum equal $n$.
Note the connection to the Fast Fourier Transform, where this optimization problem arises in the choice of the radix. The radix $3$ is optimal in this sense, but the more usual radix $2$ has other advantages.
To motivate the solution using calculus, we can divide $n$ into $k$ equal parts and maximize $\left(\frac nk\right)^k$ with respect to $k$:
$$
\frac{\mathrm d}{\mathrm dk}\log\left(\frac nk\right)^k=\frac{\mathrm d}{\mathrm dk}\left(k(\log n-\log k)\right)=\log n-\log k-1\stackrel{!}{=}0\;,
$$
yielding $k=\frac n{\mathrm e}$ and thus parts of size $\mathrm e$. The optimal value of$ \left(\frac nk\right)^k$ is thus
$$
\left(\sqrt[\mathrm e]{\mathrm e}\right)^n\approx1.445^n\;,
$$
compared with
$$
\left(\sqrt[2]2\right)^n\approx1.414^n
$$
and
$$
\left(\sqrt[3]3\right)^n\approx1.442^n\;,
$$
so the differences between $2$, $\mathrm e$ and $3$ are rather marginal.
