hi,

i am a newbie here. And my math is pretty weak.
In a question paper recently..
we were asked to write an algorithm that could find the value of (3 + sqrt(5))^n
(Read as The n-th power of 3 + square root of 5)

2<=n<= 20000000

As you wud guess, i cudnt solve it.

In the solution, they used a matrix with values 0,1,-4,6 in a 2X2 matrix.

And beyond that i did not understand anything.
Cud u plsss explain..

Thnx in advance