2018-09-30 22:01:58 +00:00
---
id: 5900f4231000cf542c50ff36
title: 'Problem 183: Maximum product of parts'
2020-11-27 18:02:05 +00:00
challengeType: 5
2019-08-05 16:17:33 +00:00
forumTopicId: 301819
2021-01-13 02:31:00 +00:00
dashedName: problem-183-maximum-product-of-parts
2018-09-30 22:01:58 +00:00
---
2020-11-27 18:02:05 +00:00
# --description--
2021-07-15 13:52:14 +00:00
Let $N$ be a positive integer and let $N$ be split into $k$ equal parts, $r = \frac{N}{k}$, so that $N = r + r + \cdots + r$.
2020-11-27 18:02:05 +00:00
2021-07-15 13:52:14 +00:00
Let $P$ be the product of these parts, $P = r × r × \cdots × r = r^k$.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
For example, if 11 is split into five equal parts, 11 = 2.2 + 2.2 + 2.2 + 2.2 + 2.2, then $P = {2.2}^5 = 51.53632$.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
Let $M(N) = P_{max}$ for a given value of $N$.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
It turns out that the maximum for $N = 11$ is found by splitting eleven into four equal parts which leads to $P_{max} = {(\frac{11}{4})}^4$; that is, $M(11) = \frac{14641}{256} = 57.19140625$, which is a terminating decimal.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
However, for $N = 8$ the maximum is achieved by splitting it into three equal parts, so $M(8) = \frac{512}{27}$, which is a non-terminating decimal.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
Let $D(N) = N$ if $M(N)$ is a non-terminating decimal and $D(N) = -N$ if $M(N)$ is a terminating decimal.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
For example, $\sum D(N)$ for $5 ≤ N ≤ 100$ is 2438.
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
Find $\sum D(N)$ for $5 ≤ N ≤ 10000$.
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
# --hints--
2018-09-30 22:01:58 +00:00
2021-07-15 13:52:14 +00:00
`maximumProductOfParts()` should return `48861552` .
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
```js
2021-07-15 13:52:14 +00:00
assert.strictEqual(maximumProductOfParts(), 48861552);
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --seed--
2018-09-30 22:01:58 +00:00
2020-11-27 18:02:05 +00:00
## --seed-contents--
2018-09-30 22:01:58 +00:00
```js
2021-07-15 13:52:14 +00:00
function maximumProductOfParts() {
2020-09-15 16:57:40 +00:00
2018-09-30 22:01:58 +00:00
return true;
}
2021-07-15 13:52:14 +00:00
maximumProductOfParts();
2018-09-30 22:01:58 +00:00
```
2020-11-27 18:02:05 +00:00
# --solutions--
2018-09-30 22:01:58 +00:00
```js
// solution required
```