I have a problem about fibonacci numbers: ==================
let f[i] be the ith fibonacci number
f[i] = 1 (1 <= i <= 2)
f[i] = f[i-1] + f[i-2] (i > 2)
how can i calculate f[f[n]] mod M (n, M <= 10^9). anyone can help me?
How can i calculate the the (nth fibonacci)th fibonacci number mod M with (n, M <= 10^9)
I have a problem about fibonacci numbers: ==================
how can i calculate f[f[n]] mod M (n, M <= 10^9). anyone can help me?