0%

Problem 840


Problem 840


Sum of Products

A partition of n is a set of positive integers for which the sum equals n.

The partitions of 5 are:

{5},{1,4},{2,3},{1,1,3},{1,2,2},{1,1,1,2} and {1,1,1,1,1}.

Further we define the function D(p) as:
(1)D(1)=1(2)D(p)=1, for any prime p(3)D(pq)=D(p)q+pD(q), for any positive integers p,q>1.

Now let a1,a2,,ak be a partition of n.

We assign to this particular partition the value:
P=j=1kD(aj).

G(n) is the sum of P for all partitions of n.

We can verify that G(10)=164.

We also define:
S(N)=n=1NG(n).
You are given S(10)=396.

Find S(5×104)mod999676999.


乘积之和

n的一个分拆是指一组无序且和为n的正整数。

例如,5的分拆包括:

{5}{1,4}{2,3}{1,1,3}{1,2,2}{1,1,1,2}{1,1,1,1,1}

进一步定义函数D(p)如下:
(4)D(1)=1(5)D(p)=1,对于任意质数p(6)D(pq)=D(p)q+pD(q),对于任意正整数p,q>1.

考虑n的分拆a1,a2,,ak

这一分拆的得分是:
P=j=1kD(aj)

G(n)n的所有分拆的得分P之和。

可以验证G(10)=164

再定义:
S(N)=n=1NG(n)
已知S(10)=396

S(5×104)mod999676999


Gitalking ...