Problems > Sequence r=5a+4b (r0=0,r1=1) > Editorial

Sequence r=5a+4b (r0=0,r1=1) — Solution & Editorial

Back to the Problem

2×2 companion matrix exponentiation.

Complexity: O(log N)