If sum of n natural number is 20 then what is their max. product ?
If sum of n natural number is 20 then what is their max. product?
2.5k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
HINT:
- $2+2+2=3+3$
- $2\times2\times2<3\times3$
So in order to maximize the product, use as many $3$s as possible.
On
Let $s=20$ denote the given sum.
As almagest noted, $k(k+2)\lt(k+1)^2$ shows that the factors can differ by at most $1$. Thus there must be $j$ factors of $\left\lceil\frac sn\right\rceil$ and $n-j$ factors of $\left\lfloor\frac sn\right\rfloor$, with $j$ determined by
$$j\left\lceil\frac sn\right\rceil+(n-j)\left\lfloor\frac sn\right\rfloor=s$$
and thus
\begin{align} j&=\frac{s-n\left\lfloor\frac sn\right\rfloor}{\left\lceil\frac sn\right\rceil-\left\lfloor\frac sn\right\rfloor}=s-n\left\lfloor\frac sn\right\rfloor=n\left(\frac sn-\left\lfloor\frac sn\right\rfloor\right)=n\left\{\frac sn\right\}=s\bmod n\;, \end{align}
where $\{x\}$ is the fractional part of $x$. Thus, the solution has $s\bmod n$ factors of $\left\lceil\frac sn\right\rceil$ and $n-(s\bmod n)$ factors of $\left\lfloor\frac sn\right\rfloor$.
As shown here (and apparently also in almagest's answer, though I don't understand the argument there), if the intent was to maximise this over all $n$, the optimal case has only factors of $2$ and $3$, so it has either $\left\lfloor\frac sn\right\rfloor=2$, or $\frac sn=3$, and since $3^2\gt2^3$, among these cases it's the one with lowest $n$, which is $n=\left\lceil\frac s3\right\rceil$, and the product is
$$ 3^{s\bmod\left\lceil\frac s3\right\rceil}2^{\left\lceil\frac s3\right\rceil-s\bmod\left\lceil\frac s3\right\rceil}=2^{\left\lceil\frac s3\right\rceil}\left(\frac32\right)^{s\bmod\left\lceil\frac s3\right\rceil}=3^{\left\lceil\frac s3\right\rceil}\left(\frac23\right)^{(-s)\bmod 3}\;. $$
In the present case, for $s=20$, the optimal $n$ is $7$ and the maximal product is
$$3^{\left\lceil\frac{20}3\right\rceil}\left(\frac23\right)^{(-20)\bmod 3}=2\cdot3^6=1458\;.$$
There are two ways of interpreting this question. The first is "what is the maximum possible product for a (finite) sequence of natural numbers whose sum is 20". The second is "Fix the natural number $n$. What is the maximum possible product for a sequence of $n$ natural numbers whose sum is $n$".
I assumed the first interpretation was correct. In which case the answer is as follows:
$2n\le n^2$ for $n\ge 2$ and $2n+1<n(n+1)$ for $n\ge 2$. So we do not need to use any number bigger than 3 to get the maximum value. Clearly there is no benefit in using 1s. We have $3^2>2^3$, so it is better to use 3s rather than 2s. The largest number available is six 3s which takes us up to 18. Hence the maximum is $2\cdot3^6=1458$.
However, others claim that the second interpretation is correct. So I will deal briefly with that. For any natural number $k$ we have $k(k+2)<(k+1)^2$, so the maximising sequence cannot have two numbers with a difference of two or more. Clearly we must have $n$ in the range $1-20$ of it is not possible to satisfy the condition that the numbers sum to 20. Call $M_n$ the maximum product for $n$ numbers.
So for $n=1$ we have $M_1=20$. We have $M_2=100$ with solution $10,10$. $M_3=294$ with solution $6,7,7$. $M_4=625$ with solution $5,5,5,5$. $M_5=1024$ with solution $4,4,4,4,4$. $M_6=1296$ with solution $3,3,3,3,4,4$. $M_7=1458$ with solution $3,3,3,3,3,3,2$. $M_8=1296$ with solution $3,3,3,3,2,2,2,2$. $M_9=1152$ with solution $3,3,2,2,2,2,2,2,2$. $M_{10}=1024$ with solution all 2s. $M_{11}=512,M_{12}=256,M_{13}=128,M_{14}=64,M_{15}=32$, $M_{16}=16,M_{17}=8,M_{18}=4$ ,$M_{19}=2,M_{20}=1$ with a mix of 1s and 2s.