0%

Problem 739


Problem 739


Summation of Summations

Take a sequence of length n. Discard the first term then make a sequence of the partial summations. Continue to do this over and over until we are left with a single term. We define this to be f(n).

Consider the example where we start with a sequence of length 8:

11111111 1234567 259142027 514284875 144290165 42132297 132429 429 

Then the final number is 429, so f(8)=429.

For this problem we start with the sequence 1,3,4,7,11,18,29,47,
This is the Lucas sequence where two terms are added to get the next term.
Applying the same process as above we get f(8)=2663.
You are also given f(20)742296999mod1 000 000 007.

Find f(108). Give your answer modulo 1 000 000 007.


求和再求和

考虑一个长度为n的数列,先去掉第一项并求部分和,再对部分和序列不断重复同样的操作,直到只剩下一项。我们记剩下的这一项为f(n)

如下展示的例子中,初始序列为81

11111111 1234567 259142027 514284875 144290165 42132297 132429 429 

最后剩下的一项为429,因此该序列对应的f(8)=429

在本题中,我们选择的初始序列为1,3,4,7,11,18,29,47,
这一类每一项是前两项之和的序列统称卢卡斯序列。
按照上述步骤可得该数列对应的f(8)=2663
已知f(20)742296999mod1 000 000 007

f(108),并将你的答案对1 000 000 007取余。


Gitalking ...