[seqfan] Re: Maximizing product for a fixed sum n
Oscar Cunningham
mail at oscarcunningham.com
Mon Oct 19 08:58:14 CEST 2020
This is a somewhat famous problem. The solution is given here:
https://math.stackexchange.com/q/125065/1149
You should pick all the ai to be equal to 3, except for one or two of
them which should be equal to 2 in order that they sum to the right
value modulo 3. Of course you can use a 4 instead of two 2s.
This sequence gives the optimal product for each n: https://oeis.org/A000792
Best regards,
Oscar
On 18/10/2020 10:31, Jack Grahl wrote:
> Dear all,
>
> Suppose I wish to find some set of positive numbers a1,a2...,ak such that
> their sum is n, and their product is as large as possible. Clearly, if I
> fix the cardinality k, the optimal solution is k copies of n/k. What is the
> best choice of k? In other words, what is the natural number k which
> maximises (n/k)^k?
>
> Calculus shows that, if we replace integer k by real number x, x = n/e is
> optimal, and hence than either k = floor(n/e) or k = ceil(n/e) is the
> optimal integer solution, with the choice of floor and ceiling possibly
> depending on n.
>
> Experimentation shows that in fact the best k is the closest integer to n/e
> for all 2 <= n <= 1000. (n = 4 is slightly exceptional, as the closest
> integer to 4/e is 1, but there is a tie between 1 and 2 for the optimal
> value of k, using the well known result that 2*2 = 4.)
>
> 1. Can anyone show that the closest integer to n/e must always be optimal?
> 2. If so, we could add the sequence 'closest integer to n/e' with a remark
> that it solves the above problem. If not, we could add both sequences, with
> a remark that they are conjectured to be the same.
>
> Best wishes,
> Jack Grahl
>
> --
> Seqfan Mailing list - http://list.seqfan.eu/
More information about the SeqFan
mailing list