In my last post, I asked

What is the largest possible product you can make with a group of positive integers if the sum of those integers is 2017?

Before we rush to the numerical answer, let’s follow my usual advice and invert the problem. What would the best possible product look like? Would it use lots of factors, or few of them? What types of integers would it include? Perhaps more importantly, what would it not include?

One easy observation to get us going is that the best possible product would not make use of any 1s. After all, a 1 doesn’t help make the product any bigger. If we were using a 1, then we’d be better off folding it into one of the other numbers. For example, if I had a 1 and a 5, I could replace the pair of them with a 6, leaving the sum of the integers the same but making the product 20% larger.

Next, we can see that the best possible product would not make use of any large integers. The reason is that large integers can always be split into smaller ones with a larger product. For example, why use a 10 when two 5s have a bigger product? It’s not immediately clear how large an integer must be before it’s a “large integer”. The answer may be surprising: just 4. For any integer $n\geq 4$, we’d be better off using $2$ and $n-2$ in place of $n$ since they have the same sum but $$ 2(n-2) \geq n .$$

Already with just those two observations, we can say that the best possible product will use only 2s and 3s. But, we still need to figure out how many of each to include. We have room to use many copies of 2 and many copies of 3. Would that be wise, or would it be preferable to make use of some kind of imbalance?

Since the sum of all of the integers in the product is always the same, we should consider whether a fixed sum of 2s gives a larger product than the same fixed sum of 3s. To be concrete, would we do better with a 6-worth of 2s or 3s? Clearly, $$ 8 = 2\cdot 2\cdot 2 < 3\cdot 3 =9 , $$ so the 3s are preferable. Therefore, if our product had three 2s, we could improve it by swapping in more 3s.

We can finally say exactly what our solution looks like, even though we don’t have the answer yet: the group of integers giving the largest possible product will consist of at most two 2s and the rest 3s. Now we just have to figure out how to make the factors sum to 2017 using those rules.

We cannot make 2017 out of just 3s since 2017 is not a multiple of 3. Furthermore, we can’t make it with just one 2 since 2017-2=2015 is also not a multiple of 3. But we can get by with two 2s, since $2017 – 2\times 2 = 2013 = 3\times 671$. The largest product is $\boxed{2^2\times 3^{671}$. If you really need to expand that product, that’s what WolframAlpha is for: