Find the value of $n$ such that the sum of positive numbers $a_1, a_2, \ldots , a_n$ is 2018 and the product of these same numbers is maximized.

**
Bonus:
**
Generalize this for the sum of
$N$
.

888
648
783
742
245
828
202
700

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

For any integer N... By AM GM Inequality we know that all the partitions should be equal. So we need to find the minimum value of (N/x)^x where x is the number of partitions. By differentiating the function and putting it equal to 0. We get x=(N/e), where e is euler's number. Here N is 2018 so we get x=742.38 . So the nearest option is 742.