In the Fibonacci integer sequence, F0=0,F1=1F_0 = 0, F_1 = 1F0=0,F1=1, andFn=Fn1+Fn2F_n = F_{n 1} + F_{n 2}Fn=Fn1+Fn2 for n≥2n geq 2n≥2. For example, the first ten terms of the Fibonacci sequence are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …An alternative formula for the Fibonacci sequence is . Given an integern, your goal is to compute the last 4 digits ofFn.
In the Fibonacci integer sequence, F0=0,F1=1F_0 = 0, F_1 = 1F0=0,F1=1, andFn=Fn−1+Fn−2F_n = F_{n − 1} + F_{n − 2}Fn=Fn−1+Fn−2 for n≥2n geq 2n≥2. For example, the first ten terms of the Fibonacci sequence are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … An alternative formula for the Fibonacci sequence is . Given an integer n, your goal is to compute the last 4 digits of Fn.
(图片来源网络,侵删)