
Hmnn. I'll assume you got the recurrence (which is a huge story to explain how to get)
In that problem the recurrence I found was:
F(n) = 6*F(n1)  4*F(n2)
I know F(2)=28, F(1) = 6 and F(0) = 2
If we want to take a pair (6,2) and get the next pair (28, 6) based on the formula above...
(6,2) x ??? = ( 28, 6 )
(6,2) x ??? = ( 6*64*2, 6 )
If the pair was (x,y) :
(x,y) x ??? = ( 6*x4*y, 1*x + 0*y )
So, this ??? thing we got to find will convert the pair to the next pair when you multiply to it.
From the definition of matrix product:
(x , y)x( 6 1) = (6*x  4*y , 1*x + 0y)
(4 0)
Anyway, to get the second pair:
(6 , 2)x( 6 1) = (6*6  4*2 , 1*6 + 0) = ( 28, 6)
(4 0)
We can now guess that if we raised ( (6,1),(4,0) ) to the (n1) power, we would have a matrix we can multiply to (6,2) to get the nth pair. And evaluating the nth power of a 2x2 matrix takes O(log(n)) time.
PS: Is this what you meant? 