Determine the maximum value that is obtained by multiplying together a set of positive integers which are all different and whose sum is 100.
The numbers 1 to 14 sum to 105. If you leave out the 1 and 4 the product is 15!/4 = 21794572800.
To include 15, you'd need to exclude numbers with a higher product than 15. This would lower the product, so I'm pretty sure I'm right.
Note: Going a little further:
If the sum were to be 104 you could just use the numbers 2 to 14 (105 is a triangular number) for a product 14!
For a sum of 105 you can jump up to 15!/14
For a sum of 106 use 15!/13
etc.
It looks like a general formula can be derived.
|
Posted by Jer
on 2025-03-11 12:00:53 |