2018-09-30 23:01:58 +01:00
---
id: 5900f4e51000cf542c50fff6
title: 'Problem 374: Maximum Integer Partition Product'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 302036
2021-01-13 03:31:00 +01:00
dashedName: problem-374-maximum-integer-partition-product
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2021-07-29 21:48:17 +02:00
An integer partition of a number $n$ is a way of writing $n$ as a sum of positive integers.
2018-09-30 23:01:58 +01:00
2021-07-29 21:48:17 +02:00
Partitions that differ only in the order of their summands are considered the same. A partition of $n$ into distinct parts is a partition of $n$ in which every part occurs at most once.
2018-09-30 23:01:58 +01:00
2021-07-29 21:48:17 +02:00
The partitions of 5 into distinct parts are:
2018-09-30 23:01:58 +01:00
2021-07-29 21:48:17 +02:00
5, 4 + 1 and 3 + 2.
2018-09-30 23:01:58 +01:00
2021-07-29 21:48:17 +02:00
Let $f(n)$ be the maximum product of the parts of any such partition of $n$ into distinct parts and let $m(n)$ be the number of elements of any such partition of $n$ with that product.
2018-09-30 23:01:58 +01:00
2021-07-29 21:48:17 +02:00
So $f(5) = 6$ and $m(5) = 2$.
2018-09-30 23:01:58 +01:00
2021-07-29 21:48:17 +02:00
For $n = 10$ the partition with the largest product is $10 = 2 + 3 + 5$, which gives $f(10) = 30$ and $m(10) = 3$. And their product, $f(10) \times m(10) = 30 \times 3 = 90$
2018-09-30 23:01:58 +01:00
2021-07-29 21:48:17 +02:00
It can be verified that $\sum f(n) \times m(n)$ for $1 ≤ n ≤ 100 = 1\\,683\\,550\\,844\\,462$.
Find $\sum f(n) \times m(n)$ for $1 ≤ n ≤ {10}^{14}$. Give your answer modulo $982\\,451\\,653$, the 50 millionth prime.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2021-07-29 21:48:17 +02:00
`maximumIntegerPartitionProduct()` should return `334420941` .
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
2021-07-29 21:48:17 +02:00
assert.strictEqual(maximumIntegerPartitionProduct(), 334420941);
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```js
2021-07-29 21:48:17 +02:00
function maximumIntegerPartitionProduct() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
2021-07-29 21:48:17 +02:00
maximumIntegerPartitionProduct();
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```