Problems > Sequence f=4a+3b > Editorial

Sequence f=4a+3b — Solution & Editorial

Back to the Problem

Exponentiate the 2×2 companion matrix [[4, 3], [1, 0]] in O(log N).

Complexity: O(log N)