Posts

Showing posts from November, 2019
Image
                                                    Hard Fibonacii...... Today we eill learn to find the n'th fibonacci number after %M. Since it is vey dfficult to store the large Fibonacci number,because the rate is exponention. But there is a unique properties of Fibonacci series by which it is periodic n nature.... Lets see an samll example  m = 2 or m = 3. Take a detailed look at this table. Do you see? Both these sequences are periodic!  For m = 2, the period is 011 and has length 3, while for  m = 3 the period is 01120221 and has length 8.  Therefore, to compute, say, F2015 mod 3 we just need to find the remainder of 2015 when divided by 8. Since 2015 = 251·8 + 7, we conclude that F2015 mod 3 = F7 mod 3 = 1. This is true in general: for any integer m ≥ 2, the sequence Fn mod m is periodic. The period always...