Power of Power Partition Function
Time limit2sMemory limit512 MB
Given n up to 1e18, m up to 1e18, and k up to 10, compute the sum of the k-th convolution power of the m-ary partition function up to n, modulo 1e9+7.
- Level
Hard9 of 10
- Topics
- Number theory, Divide and conquer, Dynamic programming, Math
- Solved
- No attempts yet
Problem
Let be a fixed integer with . For a positive integer , is the number of ways to write as a sum of powers of with non-negative exponents. Repetitions are allowed, and the order of the summands does not matter. We also set , since the empty sum is one way.
For example, the first 10 terms of are , and the first 10 terms of are .
Let be the -th convolution power of , defined as follows.
Given , , and , Bobo wants to find the value of
Input
The first line contains three integers , , and (, , ).
Output
Print the value of .