An expression of the form q1 + 1/b2, where b2 = q2 + 1/b3, b3 = q3 + 1/b4, and so on, where q1, q2,…are positive integers, with the possible exception of q1. This can be written
or, in a form that is easier to print,
If the continued fraction terminates, it gives a rational number. The expression of any given positive rational number as a continued fraction can be found by using the Euclidean algorithm. For example, 1274/871 is found, by using the steps which appear in the entry on the Euclidean algorithm, to equal
When the continued fraction continues indefinitely, it represents a real number that is the limit of the sequence
and every real number can be uniquely represented by a continued fraction. For example, representation of as a continued fraction is