0%

Problem 823


Problem 823


Factor Shuffle

A list initially contains the numbers 2,3,,n.

At each round, every number in the list is divided by its smallest prime factor. Then the product of these smallest prime factors is added to the list as a new number. Finally, all numbers that become 1 are removed from the list.

For example, below are the first three rounds for n=5:
[2,3,4,5](1)[2,60](2)[30,4](3)[15,2,4].
Let S(n,m) be the sum of all numbers in the list after m rounds.

For example, S(5,3)=15+2+4=21. Also S(10,100)=257.

Find S(104,1016). Give your answer modulo 1234567891.


因数重排

考虑初始数列2,3,,n

在每一轮中,将数列中的每个数都除以其最小的质因数,再将这些质因数的乘积加入数列,最后将所有的1从数列中移除。

例如,当n=5时,前三轮的操作如下:
[2,3,4,5](1)[2,60](2)[30,4](3)[15,2,4]
S(n,m)为进行m轮后数列中所有数之和。

例如,S(5,3)=15+2+4=21。已知S(10,100)=257

S(104,1016),并将你的答案对1234567891取余。


Gitalking ...