890. Binary Partitions

Let p(n) be the number of ways to write n as the sum of powers of two, ignoring order.

For example, p(7)=6, the partitions being

7=1+1+1+1+1+1+1=1+1+1+1+1+2=1+1+1+2+2=1+1+1+4=1+2+2+2=1+2+4

You are also given p(77)144548435(mod109+7).

Find p(7777). Give your answer modulo 109+7.

890. 二进制拆分

p(n) 为:不考虑顺序,将 n 拆分为若干个 2 的幂的和的方案数。

例如 p(7)=6,所有可能的拆分方案如下:

7=1+1+1+1+1+1+1=1+1+1+1+1+2=1+1+1+2+2=1+1+1+4=1+2+2+2=1+2+4

你亦已知 p(77)144548435(mod109+7)

p(7777)(109+7) 的值。


这个链接 回到源站。

这个链接 回到详细版题目目录。