2

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?

Mathejunior
  • 3,344
  • 2
    If any of $a_i$ is bigger than $4$, then we can make the product even bigger by replacing it with $2$ and $a_i-2$. What can you get about $2, 3, 4$? EDIT: Oh, I overlooked that $n$ is fixed number. One thing to note is that $a_i$s should not differ more than 2. – didgogns May 05 '17 at 14:00
  • 1
    Check out the solution given here: https://math.stackexchange.com/questions/1571526/maximize-product-with-sum-constraint – Brenton May 05 '17 at 14:04
  • @Brenton I did see the link but that doesn't satisfy my answer properly I feel. It basically says that all terms have to be equal. But I have mentioned that $n$ is not fixed. Whoever attempts to solve the problem has the free will to find out the $n$. The question wants to know the value of $a_1a_2 \cdots a_n$ – Mathejunior May 05 '17 at 14:09
  • 2
    This looks very similar: https://math.stackexchange.com/questions/2171746/maximum-of-a-1-cdot-a-2-cdots-a-n-given-a-1-cdots-a-n-1000 – Martin R May 05 '17 at 14:39
  • I was about to post an answer, but the Q is not clear. Are$ a_1,...,a_n $ required to be $n$ distinct values? Or are duplicates allowed? – DanielWainfleet May 06 '17 at 07:30
  • @DanielWainfleet It's up to you. You've to construct. – Mathejunior May 06 '17 at 07:31

1 Answers1

0

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.$