0

Given a natural number N, find the combination of natural numbers that sums N and has the biggest product.

For example:

  • 8 gives 3x3x2 = 18
  • 10 gives 3x3x4 = 36
  • 20 gives 3x3x3x3x3x3x2 = 4374

I "guess" that the answear is:

  • divide the number by 3
  • write that amount of 3s
  • if the leftover is 1, the last 3 becomes a 4
  • if the leftover is 2, add 2 at the end of the sequence

But I dont understand why 3 is the answear here, and I also cannot prove that my answear is correct. Can anyone explain that, please?

1 Answers1

2

You don't want a summand which is $5$ or more because replacing $5$ by $3+2$ gives you a bigger product, replacing $6$ by $4+2$ gives a bigger product, and so on.

You can have a $4$ but you don't need it because replacing $4$ by $2+2$ gives the same product.

You can't have a $1$ because replacing $1$ and $x$ by $x+1$ gives a bigger product.

So you only want $2$s and $3$s.

You don't want three or more $2$s because replacing $2+2+2$ by $3+3$ gives a bigger product.

Therefore you want either two $2$s, or one, or none at all, and the rest will be $3$s. Considering the remainder when $N$ is divided by $3$ then gives you just one possibility (except that, as mentioned above, if you have $2+2$ you could optionally replace it by $4$).

David
  • 82,662