A continued fraction is a unique representation of a number, obtained by recursively subtracting the integer part of that number and then computing the continued fraction of the reciprocal of the remainder, if it is nonzero. If the number is rational, this process terminates with a finite continued fraction:
$\frac{123}{45}\=2\+\frac{1}{1\+\frac{1}{2\+\frac{1}{1\+\frac{1}{3}}}}$
Otherwise, the result is called an infinite continued fraction:
$\mathrm{\pi}equals;3plus;\frac{1}{7plus;\frac{1}{15plus;\frac{1}{1plus;\frac{1}{..period;}}}}$
Continued fractions can be used to find rational approximations to real numbers, by simply truncating the resulting fraction at a certain point. For example, $\mathrm{pi;}\approx 3plus;\frac{1}{7}$.
The numbers appearing on the left of the expansion (the integer parts) are called coefficients.

Coefficient facts


•

The continued fraction coefficients of quadratic numbers (solutions of a quadratic equation with integer coefficients) eventually repeat.

•

For some nonquadratic numbers such as Euler's number $e\=2.718..\.$, the coefficients have an obvious pattern: 2, 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, ...

•

However, for almost all real numbers $\mathit{x}$, the geometric mean of the coefficients of the continued fraction expansion of $\mathit{x}$ is the following number:

2.6854520010653064453097148...
which is known as Khinchin's constant.

