I am trying to understand continued fraction. But I am unable to understand a statement from SY Yan's book.
Say, a/b = [q0, q1, ...., qn] where qi's are the partial quotients of the fraction. Then, the kth convergent of this fraction is the fraction which have a representation denoted by [q0, q1, ...., qk].
Now, lets the kth convergent is Ck. Then, Ck = Pk/Qk = (qk*Pk-1 + Pk-2)/(qk*Qk-1 + Qk-2) .... (1)
So far I have verified the statements and they are consistent.
But, then Yan stated that, if, Pk = qk*Qk-1 + Qk-2 and Qk = qk*Pk-1 + Pk-2, then GCD(Pk, Qk) = 1 ...... (2)
But, How it can be? As, (2) and (1) impiles Pk/Qk = Qk/Pk, implies Pk = Qk. What did I miss?