Given $$$n$$$ and $$$k$$$ you're asked to compute
$$$$$$ \sum_{i = 1}^{n} f_{i}^{k} $$$$$$
where $$$f_{n}$$$ is the $$$n$$$-th fibonacci number. The $$$n$$$-th fibonacci number can be computed as:
$$$$$$ f_{1} = f_{2} = 1 $$$$$$ $$$$$$ f_{n} = f_{n - 1} + f_{n - 2}, \forall n \geq 3 $$$$$$
Since the answer could be large, print it modulo $$$10^{9} + 7$$$.
The first line of input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \leq n \leq 10^{18}$$$, $$$1 \leq k \leq 10^{5}$$$) — The limits of the sum and the exponent of all the terms.
Print a single line — The value of the required sum modulo $$$10^{9} + 7$$$.
1 10
1
5 10
9825700
10 1
143
2 1
2
3 1
4
4 1
7
| Название |
|---|


