Hi all ,
Is it possible to calculate the Nth (1 <= N <= 1e18) term of following quadratic recurrence using matrix exponentiation.
F(i) = a * F(i -1) * F(i -1) + b * F(i -1) + c , where a , b , c are non negative constants and F0 (Initial Term) is given.
No, only linear recurrences terms can be calculated using matrix exponentiation.
Cant it be solved any other ways?
If the modulus is small, then find a period. For some a, b, c there might be interesting formulae, but none faster than O(n) that I'm aware of.
thanks for sharing your idea. :)
These type of equation are known as Quadratic Map. Maybe this can help you.
thanks. It helped :)