0%

Problem 374


Problem 374


Maximum Integer Partition Product

An integer partition of a number n is a way of writing n as a sum of positive integers.

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.

The partitions of 5 into distinct parts are:
5, 4+1 and 3+2.

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.

So f(5)=6 and m(5)=2.

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)·m(10) = 30·3 = 90

It can be verified that
∑f(n)·m(n) for 1 ≤ n ≤ 100 = 1683550844462.

Find ∑f(n)·m(n) for 1 ≤ n ≤ 1014.
Give your answer modulo 982451653, the 50 millionth prime.


整数分拆最大乘积

整数n的分拆是将n写成一系列正整数的和。

只有所加正整数顺序不同的分拆被认为是同样的分拆。n的不等分拆是指分拆后每个正整数至多出现一次的n的分拆。

5的不等分拆包括:
5、4+1和3+2。

记f(n)是n的不等分拆中各正整数乘积的最大值,并记m(n)为相应分拆中正整数的个数。

因此f(5)=6且m(5)=2。

对于n=10,乘积最大的分拆是10=2+3+5,因此f(10)=30且m(10)=3。
这两者的乘积为f(10)·m(10) = 30·3 = 90

可以验证
对于1 ≤ n ≤ 100,∑f(n)·m(n) = 1683550844462。

对于1 ≤ n ≤ 1014,求∑f(n)·m(n)。
将其除以第五千万个素数982451653取余作为你的答案。