What set of positive integers with sum 2024 has highest possible product?
Same question for 2025.
What is the highest product in this century?
Inspired by: Putnam 1979
To find the best ways of optimizing the product I tried dividing 2025 into increasing numbers of the equal amounts, at first without regard to the pieces being integers:
n=2025
for i=1:1000
fprintf('%5d %15.9f
',i,log((n/i))*i)
end
742 744.949996389
743 744.953298573
744 744.955254862
745 744.955867065 the optimum
746 744.955136985
747 744.953066423
748 744.949657171
749 744.944911022
showing the natural log of the product for a given number of equal pieces.
As 2025/745 =~ 2.71812080536913, this is about e.
I theorized that using a sufficient number of 2's in combination with 3's such that the average would approximate e, would give the answer. I tried all possible combinations of 2 and 3:
for twos=0:400
threes=(2025-twos*2)/3;
if threes==floor(threes)
s=[repmat(2,1,twos) repmat(3,1,threes)];
fprintf('%4d %4d %15d
',twos,threes,sum(log(s)))
end
end
but the optimum came with no 2's: all 3's:
2's 3's ln(product)
0 675 7.415633e+02
3 673 7.414455e+02
6 671 7.413277e+02
9 669 7.412099e+02
12 667 7.410922e+02
15 665 7.409744e+02
18 663 7.408566e+02
21 661 7.407388e+02
24 659 7.406210e+02
27 657 7.405032e+02
So the product of 675 3's (i.e., 3^675) would seem to be the highest such product.
The numbers for 2024 are similar, but one 2 is needed to make the rest divisible by 3: 674 3's. The product would be 2*3^674.
The maximum for all this century, through 2100, is that for 2100: 3^700, a 334-digit number beginning 9657802140591758....
Edited on March 26, 2024, 5:13 pm
|
Posted by Charlie
on 2024-03-26 14:04:32 |