Find $max(\prod{a_i})$ given that $\sum a_i=2017$ for $n$ number of positive integers from $a_1, a_2, \cdots, a_n$

228 Views Asked by At

Find the maximum value of $(\prod{a_i})$ given that $\sum a_i=2017$ for $n$ number of positive integers from $a_1, a_2, \cdots, a_n$

I don't understand how to do it. I had thought of proceeding by AM-GM and got to the conclusion that $\bigg(\frac{2017}{n}\bigg)^n \geq a_1a_2 \cdots a_n$ and then we can check how the function (LHS) increases and work on that. But I can't do it.

May I get some help?

1

There are 1 best solutions below

0
On

If $a_j\geq 2+a_i$ for some $j,i$ then the product is not maximal. For we can replace $a_j$ and $a_i$ with $a'_j=a_j-1$ and $a'_i=a_i+1.$ Then $a'_j+a'_i=a_j+a_i$, but $a'_ja'_i=(a_j-1)(a_i+1)=a_ja_i+(a_j-a_i)-1\geq a_ja_i+2-1>a_ja_i.$

Let $2017=nM+r$ with non-negative integers $M, r$ with $0\leq r\leq n-1.$ Let $A_i=M$ for $i\leq n-r$ and let $A_i=M+1$ for $n-r+1\leq i\leq n.$ This is the only way, up to permutations, to have a sequence of $n$ (not necessarily) distinct) positive integers add to $2017,$ such that the absolute difference between any two of them is at most $1.$