ROSECODE 459
Convergents of infinite sum
Define a sequence as below: , where is a positive integer greater than or equal to 3.
Let infinite sum be
It can be proved that the infinite sum is convergent and is an irrational number for all possible values of .
can be represented as an infinite continued fraction and corresponding convergents are denoted by ( , and are coprime). For example, for = 6, = 0.1715728752..., and the first several convergents are = 0/1, = 1/5, = 1/6, = 5/29 and so on.
Let and be numerator and denominator of the th convergents of with value , respectively. For instance, = 5, = 29. Given Fibonacci sequence fn defined as , , ( ). The value of this sequence is no less than 3 from the 4th item.
Let the sum and . You are given = 606, = 2784, = 774200907, = 830200702.
Find and , both modulo 1000000007.
Answer format: [ ],[ ]
Example: 774200907,830200702 for and
Thanks to czp for the idea.
Let infinite sum
Let
Let the sum
Find
Answer format: [
Example: 774200907,830200702 for
Thanks to czp for the idea.