Sometimes there are two different recursive function for even and odd n. Such as if n is even, then f(n) = f(n-1)/2, otherwise (if n is odd) f(n) = 3f(n-1) + 1.
I know basic of matrix exponentiation on many variation but now i am facing problem on it.
please someone explain.