To define a number, we must not only name it but also write it down. Fractional notation applies only to rational numbers. A decimal expansion—or an expansion in any other base—provides one solution. This notation has many advantages, but it still depends on an arbitrary choice: the base. Our societies use base 10, but others are possible; 2, 8, 16 and 60 are among the best known. Continued fraction expansions avoid this drawback. But what exactly are they?
Euclid's algorithm ----------------------
The notion of a continued fraction is linked to Euclidean division and is implicit in Euclid's algorithm, which the Alexandrian scholar set out in Book VII of the Elements. Recall the procedure.
Take two positive integers 0 < b < a and perform the Euclidean division a = bq1 + r1, where 0 ≤ r1 < b. If r1 = 0, the process stops; otherwise, we can rewrite the equality as follows: ab=q1+1b/r1\frac{a}{b}=q_1+\frac{1}{b/r_1}.
Repeat the procedure with b and r1; Euclidean division then gives b = r1 q2 + r2, where 0 ≤ r2 < r1. Thus, if r2 is nonzero, br1=q2+1r1/r2\frac{b}{r_1}=q_2+\frac{1}{r_1/r_2}.