Continued fraction
Encyclopedia
In mathematics
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

, a continued fraction is an expression
Expression (mathematics)
In mathematics, an expression is a finite combination of symbols that is well-formed according to rules that depend on the context. Symbols can designate numbers , variables, operations, functions, and other mathematical symbols, as well as punctuation, symbols of grouping, and other syntactic...

 obtained through an iterative process of representing a number as the sum of its integer part and the reciprocal
Multiplicative inverse
In mathematics, a multiplicative inverse or reciprocal for a number x, denoted by 1/x or x−1, is a number which when multiplied by x yields the multiplicative identity, 1. The multiplicative inverse of a fraction a/b is b/a. For the multiplicative inverse of a real number, divide 1 by the...

 of another number, then writing this other number as the sum of its integer part and another reciprocal, and so on. In a finite continued fraction (or terminated continued fraction), the iteration/recursion
Recursion
Recursion is the process of repeating items in a self-similar way. For instance, when the surfaces of two mirrors are exactly parallel with each other the nested images that occur are a form of infinite recursion. The term has a variety of meanings specific to a variety of disciplines ranging from...

 is terminated after finitely many steps by using an integer in lieu of another continued fraction. In contrast, an infinite continued fraction is an infinite expression
Infinite expression (mathematics)
In mathematics, an infinite expression is an expression in which some operators take an infinite number of arguments, or in which the nesting of the operators continues to an infinite depth...

. In either case, all integers in the sequence, other than the first, must be positive
Negative and non-negative numbers
A negative number is any real number that is less than zero. Such numbers are often used to represent the amount of a loss or absence. For example, a debt that is owed may be thought of as a negative asset, or a decrease in some quantity may be thought of as a negative increase...

.

Continued fractions have a number of remarkable properties related to the Euclidean algorithm
Euclidean algorithm
In mathematics, the Euclidean algorithm is an efficient method for computing the greatest common divisor of two integers, also known as the greatest common factor or highest common factor...

 for integers or real number
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...

s. Every rational number
Rational number
In mathematics, a rational number is any number that can be expressed as the quotient or fraction a/b of two integers, with the denominator b not equal to zero. Since b may be equal to 1, every integer is a rational number...

 p/q has two closely related expressions as a finite continued fraction, whose coefficient
Coefficient
In mathematics, a coefficient is a multiplicative factor in some term of an expression ; it is usually a number, but in any case does not involve any variables of the expression...

s ai can be determined by applying the Euclidean algorithm to (p,q). The numerical value of an infinite continued fraction will be irrational; it is defined from its infinite sequence of integers as the limit
Limit (mathematics)
In mathematics, the concept of a "limit" is used to describe the value that a function or sequence "approaches" as the input or index approaches some value. The concept of limit allows mathematicians to define a new point from a Cauchy sequence of previously defined points within a complete metric...

 of a sequence of values for finite continued fractions. Each finite continued fraction of the sequence is obtained by using a finite prefix of the infinite continued fraction's defining sequence of integers. Moreover, every irrational number α is the value of a unique infinite continued fraction, whose coefficients can be found using the non-terminating version of the Euclidean algorithm applied to the incommensurable
Commensurability (mathematics)
In mathematics, two non-zero real numbers a and b are said to be commensurable if a/b is a rational number.-History of the concept:...

 values α and 1. This way of expressing real numbers (rational and irrational) is called their continued fraction representation.

If arbitrary values and/or functions
Function (mathematics)
In mathematics, a function associates one quantity, the argument of the function, also known as the input, with another quantity, the value of the function, also known as the output. A function assigns exactly one output to each input. The argument and the value may be real numbers, but they can...

 are used in place of one or more of the numerators or the integers in the denominators, the resulting expression is a generalized continued fraction
Generalized continued fraction
In complex analysis, a branch of mathematics, a generalized continued fraction is a generalization of regular continued fractions in canonical form, in which the partial numerators and partial denominators can assume arbitrary real or complex values....

. When it is necessary to distinguish the first form from generalized continued fractions, the former may be called a simple or regular continued fraction, or said to be in canonical form.

The term continued fraction may also refer to representations of rational function
Rational function
In mathematics, a rational function is any function which can be written as the ratio of two polynomial functions. Neither the coefficients of the polynomials nor the values taken by the function are necessarily rational.-Definitions:...

s, arising in their analytic theory
Analytic function
In mathematics, an analytic function is a function that is locally given by a convergent power series. There exist both real analytic functions and complex analytic functions, categories that are similar in some ways, but different in others...

. For this use of the term see Padé approximation and Chebyshev rational functions
Chebyshev rational functions
In mathematics, the Chebyshev rational functions are a sequence of functions which are both rational and orthogonal. They are named after Pafnuty Chebyshev...

.

Motivation and notation

Consider a typical rational number
Rational number
In mathematics, a rational number is any number that can be expressed as the quotient or fraction a/b of two integers, with the denominator b not equal to zero. Since b may be equal to 1, every integer is a rational number...

 415/93, which is around 4.4624. As a first approximation
Approximation
An approximation is a representation of something that is not exact, but still close enough to be useful. Although approximation is most often applied to numbers, it is also frequently applied to such things as mathematical functions, shapes, and physical laws.Approximations may be used because...

, start with 4, which is the integer part. Note that the fractional part is the reciprocal
Multiplicative inverse
In mathematics, a multiplicative inverse or reciprocal for a number x, denoted by 1/x or x−1, is a number which when multiplied by x yields the multiplicative identity, 1. The multiplicative inverse of a fraction a/b is b/a. For the multiplicative inverse of a real number, divide 1 by the...

 of 93/43 which is about 2.1628. Use the integer part, 2, as an approximation for the reciprocal, to get a second approximation of 4 + 1/2 = 4.5. The fractional part of 93/43 is the reciprocal of 43/7 which is about 6.1429. Use 6 as an approximation for this to get 2 + 1/6 as an approximation for 93/43 and 4 + 1/(2 + 1/6), about 4.4615, as the third approximation. Finally, the fractional part of 43/7 is the reciprocal of 7, so its approximation in this scheme, 7, is exact and produces the exact expression 4+1/(2+1/(6+1/7)) for 415/93. This expression is called the continued fraction representation of the number. Dropping some of the less essential parts of the expression 4 + 1 / (2 + 1 / (6 + 1 / 7)) gives the abbreviated notation 415/93=[4;2,6,7]. Note that it is customary to replace only the first comma by a semicolon.

If the starting number is rational then this process exactly parallels the Euclidean algorithm
Euclidean algorithm
In mathematics, the Euclidean algorithm is an efficient method for computing the greatest common divisor of two integers, also known as the greatest common factor or highest common factor...

. In particular, it must terminate and produce a finite continued fraction representation of the number. If the starting number is irrational
Irrational number
In mathematics, an irrational number is any real number that cannot be expressed as a ratio a/b, where a and b are integers, with b non-zero, and is therefore not a rational number....

 then the process continues indefinitely. This produces a sequence of approximations, all of which are rational numbers, and these converge to the starting number as a limit. This is the (infinite) continued fraction representation of the number. Examples of continued fraction representations of irrational numbers are:
  • √19 = [4;2,1,3,1,2,8,2,1,3,1,2,8,…]. The pattern repeats indefinitely with a period of 6.
  • e = [2;1,2,1,1,4,1,1,6,1,1,8,…] . The pattern repeats indefinitely with a period of 3 except that 2 is added to one of the terms in each cycle.
  • π = [3;7,15,1,292,1,1,1,2,1,3,1,…] . The terms in this representation are apparently random.


Continued fractions are, in some ways, more "mathematically natural" representations of real number
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...

 than other representations such as decimal representations, and they have several desirable properties:
  • The Continued fraction representation for a rational number is finite and only rational numbers have finite representations. In contrast, the decimal representation of a rational number may be finite, for example 137/1600=0.085625, or infinite with a repeating cycle, for example 4/27=0.148148148148….
  • Every rational number has an essentially unique continued fraction representation. Each rational can be represented in exactly two ways, since [a0; a1, … an − 1, an] = [a0; a1, … an − 1, an − 1, 1]. Usually the first, shorter one is chosen as the canonical representation.
  • The continued fraction representation of an irrational number is unique.
  • The real numbers whose continued fraction eventually repeats are precisely the quadratic irrational
    Quadratic irrational
    In mathematics, a quadratic irrational is an irrational number that is the solution to some quadratic equation with rational coefficients...

    s. For example, the repeating continued fraction [1; 1, 1, 1, …] is the golden ratio
    Golden ratio
    In mathematics and the arts, two quantities are in the golden ratio if the ratio of the sum of the quantities to the larger quantity is equal to the ratio of the larger quantity to the smaller one. The golden ratio is an irrational mathematical constant, approximately 1.61803398874989...

    , and the repeating continued fraction [1; 2, 2, 2, …] is the square root of 2
    Square root of 2
    The square root of 2, often known as root 2, is the positive algebraic number that, when multiplied by itself, gives the number 2. It is more precisely called the principal square root of 2, to distinguish it from the negative number with the same property.Geometrically the square root of 2 is the...

    . In contrast, the decimal representations of quadratic irrationals are apparently random.
  • The successive approximations generated in finding the continued fraction representation of a number, i.e. by truncating the continued fraction representation, are in a certain sense (described below) the "best possible".

Basic formulae

A finite continued fraction is an expression of the form
where 0 is an integer, any other members are positive integers, and is a non-negative integer.

Thus, all of the following illustrate valid finite continued fractions:
Examples of finite continued fractions
Formula Numeric Remarks
All integers are a degenerate case
Simplest possible fractional form
First integer may be negative
First integer may be zero


An infinite continued fraction can be written as
with the same same constraints on the as in the finite case.

Calculating continued fraction representations

Consider a real number r.
Let i be the integer part and f the fractional part of r.
Then the continued fraction representation of r is [i; a1, a2,...], where [a1; a2,...] is the continued fraction representation of 1/f.

To calculate a continued fraction representation of a number r, write down the integer part (technically the floor
Floor function
In mathematics and computer science, the floor and ceiling functions map a real number to the largest previous or the smallest following integer, respectively...

) of r. Subtract this integer part from r. If the difference is 0, stop; otherwise find the reciprocal of the difference and repeat. The procedure will halt if and only if r is rational.
Find the continued fraction for 3.245 (= )
Step Real Number Integer part Fractional part Simplified Reciprocal of Simplified
STOP
Continued fraction form for 3.245 or is [3; 4, 12, 4]

The number 3.245 can also be represented by the continued fraction expansion [3; 4, 12, 3, 1]; refer to Finite continued fractions below.

Notations for continued fractions

The integers a0a1,  etc., are called the quotients of the continued fraction. One can abbreviate a continued fraction as


or, in the notation of Pringsheim
Alfred Pringsheim
Alfred Israel Pringsheim was a German mathematician and patron of the arts. He was born in Ohlau, Prussian Silesia and died in Zürich, Switzerland.- Family and academic career :...

, as


Here is another related notation:


Sometimes angle brackets are used, like this:


The semicolon in the square and angle bracket notations is sometimes replaced by a comma.

One may also define infinite simple continued fractions as limits
Limit of a sequence
The limit of a sequence is, intuitively, the unique number or point L such that the terms of the sequence become arbitrarily close to L for "large" values of n...

:


This limit exists for any choice of a0 and positive integers a1a2, ... .

Finite continued fractions

Every finite continued fraction represents a rational number
Rational number
In mathematics, a rational number is any number that can be expressed as the quotient or fraction a/b of two integers, with the denominator b not equal to zero. Since b may be equal to 1, every integer is a rational number...

, and every rational number can be represented in precisely two different ways as a finite continued fraction. These two representations agree except in their final terms. In the longer representation the final term in the continued fraction is 1; the shorter representation drops the final 1, but increases the new final term by 1. The final element in the short representation is therefore always greater than 1, if present. In symbols:


For example,

Continued fractions of reciprocals

The continued fraction representations of a positive rational number and its reciprocal
Multiplicative inverse
In mathematics, a multiplicative inverse or reciprocal for a number x, denoted by 1/x or x−1, is a number which when multiplied by x yields the multiplicative identity, 1. The multiplicative inverse of a fraction a/b is b/a. For the multiplicative inverse of a real number, divide 1 by the...

 are identical except for a shift one place left or right depending on whether the number is less than or greater than one respectively. In other words, the numbers represented by and are reciprocals. This is because if is an integer then if then and and if then and with the last number that generates the remainder of the continued fraction being the same for both and its reciprocal.

For example,

Infinite continued fractions

Every infinite continued fraction is irrational
Irrational number
In mathematics, an irrational number is any real number that cannot be expressed as a ratio a/b, where a and b are integers, with b non-zero, and is therefore not a rational number....

, and every irrational number can be represented in precisely one way as an infinite continued fraction.

An infinite continued fraction representation for an irrational number is mainly useful because its initial segments provide excellent rational approximations to the number. These rational numbers are called the convergent
Convergent (continued fraction)
A convergent is one of a sequence of values obtained by evaluating successive truncations of a continued fraction The nth convergent is also known as the nth approximant of a continued fraction.-Representation of real numbers:...

s
of the continued fraction. Even-numbered convergents are smaller than the original number, while odd-numbered ones are bigger.

For a continued fraction [a0a1a2, ...], the first four convergents (numbered 0 through 3) are


In words, the numerator of the third convergent is formed by multiplying the numerator of the second convergent by the third quotient, and adding the numerator of the first convergent. The denominators are formed similarly. Therefore, each convergent can be expressed explicitly in terms of the continued fraction as the ratio of certain multivariate polynomials called continuants
Continuant (mathematics)
In algebra, the continuant is a multivariate polynomial representing the determinant of a tridiagonal matrix and having applications in generalized continued fractions.-Definition:...

.

If successive convergents are found, with numerators h1h2, ... and denominators k1k2, ... then the relevant recursive relation is:



The successive convergents are given by the formula


Thus to incorporate a new term into a rational approximation, only the two previous convergents are necessary. The initial "convergents" (required for the first two terms) are 01 and 10. For example, here are the convergents for [0;1,5,2,2].
n −2 −1 0 1 2 3 4
an     0 1 5 2 2
hn 0 1 0 1 5 11 27
kn 1 0 1 1 6 13 32


When using the Babylonian method to generate successive approximations to the square root of an integer, if one starts with the lowest integer as first approximant, the rationals generated all appear in the list of convergents for the continued fraction. Specifically, the approximants will appear on the convergents list in positions 0, 1, 3, 7, 15, ..., ... For example, the continued fraction expansion for is [1; 1, 2, 1, 2, 1, 2, 1, 2, ...]. Comparing the convergents with the approximants derived from the Babylonian method:
n −2 −1 0 1 2 3 4 5 6 7
an     1 1 2 1 2 1 2 1
hn 0 1 1 2 5 7 19 26 71 97
kn 1 0 1 1 3 4 11 15 41 56


Some useful theorems

If a0, a1, a2, ... is an infinite sequence of positive integers, define the sequences and recursively:

Theorem 1

For any positive

Theorem 2

The convergents of [a0; a1, a2, ...] are given by

Theorem 3

If the nth convergent to a continued fraction is , then

Corollary 1: Each convergent is in its lowest terms (for if and had a nontrivial common divisor it would divide , which is impossible).

Corollary 2: The difference between successive convergents is a fraction whose numerator is unity:

Corollary 3: The continued fraction is equivalent to a series of alternating terms:

Corollary 4: The matrix
has determinant
Determinant
In linear algebra, the determinant is a value associated with a square matrix. It can be computed from the entries of the matrix by a specific arithmetic expression, while other ways to determine its value exist as well...

 plus or minus one, and thus belongs to the group of 2x2 unimodular matrices
Unimodular matrix
In mathematics, a unimodular matrix M is a square integer matrix with determinant +1 or −1. Equivalently, it is an integer matrix that is invertible over the integers: there is an integer matrix N which is its inverse...

 .

Theorem 4

Each (sth) convergent is nearer to a subsequent (nth) convergent than any preceding (rth) convergent is. In symbols, if the nth convergent is taken to be , then
for all r < s < n.

Corollary 1: the even convergents (before the nth) continually increase, but are always less than xn.

Corollary 2: the odd convergents (before the nth) continually decrease, but are always greater than xn.

Theorem 5



Corollary 1: any convergent is nearer to the continued fraction than any other fraction whose denominator is less than that of the convergent

Corollary 2: any convergent which immediately precedes a large quotient is a near approximation to the continued fraction.

Semiconvergents

If


are successive convergents, then any fraction of the form


where a is a nonnegative integer and the numerators and denominators are between the n and n + 1 terms inclusive are called semiconvergents, secondary convergents, or intermediate fractions. Often the term is taken to mean that being a semiconvergent excludes the possibility of being a convergent, rather than that a convergent is a kind of semiconvergent.

The semiconvergents to the continued fraction expansion of a real number x include all the rational approximations which are better than any approximation with a smaller denominator. Another useful property is that consecutive semiconvergents a/b and c/d are such that ad − bc = ±1.

Best rational approximations

A best rational approximation to a real number x is a rational number n/d, d > 0, that is closer to x than any approximation with a smaller denominator. The simple continued fraction for x generates all of the best rational approximations for x according to three rules:
  1. Truncate the continued fraction, and possibly decrement its last term.
  2. The decremented term cannot have less than half its original value.
  3. If the final term is even, half its value is admissible only if the corresponding semiconvergent is better than the previous convergent. (See below.)


For example, 0.84375 has continued fraction [0;1,5,2,2]. Here are all of its best rational approximations.
 [0;1]   [0;1,3]   [0;1,4]   [0;1,5]   [0;1,5,2]   [0;1,5,2,1]   [0;1,5,2,2] 
1


The strictly monotonic increase in the denominators as additional terms are included permits an algorithm to impose a limit, either on size of denominator or closeness of approximation.

The "half rule" mentioned above is that when ak is even, the halved term ak/2 is admissible if and only if This is equivalent to:

The convergents to x are best approximations in an even stronger sense: n/d is a convergent for x if and only if |dx − n| is the least relative error among all approximations m/c with c ≤ d; that is, we have |dx − n| < |cx − m| so long as c < d. (Note also that |dkx − nk| → 0 as k → ∞.)

Best rational within an interval

A rational that falls within the interval , for , can be found with the continued fractions for and . When both and are irrational and
where and have identical continued fraction expansions up through , a rational that falls within the interval is given by the finite continued fraction,
This rational will be best in that no other rational in (x,y) will have a smaller numerator or a smaller denominator.

If is rational, it will have two continued fraction representations that are finite, and , and similarly a rational will have two representations, and . The coefficients beyond the last in any of these representations should be interpreted as +∞; and the best rational will be one of , , , or .

For example, the decimal representation 3.1416 could be rounded from any number in the interval . The continued fraction representations of 3.14155 and 3.14165 are
and the best rational between these two is
Thus, in some sense, 355/113 is the best rational number corresponding to the rounded decimal number 3.1416.

Interval for a convergent

A rational number, which can be expressed as finite continued fraction in two ways,
will be one of the convergents for the continued fraction expansion of a number, if and only if the number is strictly between
Note that the numbers and are formed by incrementing the last coefficient in the two representations for , and that when is even, and when is odd.

For example, the number 355/113 has the continued fraction representations
and thus 355/113 is a convergent of any number strictly between

Comparison of continued fractions

Consider x = [a0a1, ...] and y = [b0b1, ...]. If k is the smallest index for which ak is unequal to bk then x < y if (−1)k(ak − bk) < 0 and y < x otherwise.

If there is no such k, but one expansion is shorter than the other, say x = [a0a1, ..., an] and y = [b0b1, ..., bnbn+1, ...] with ai = bi for 0 ≤ i ≤ n, then x < y if n is even and y < x if n is odd.

Continued fraction expansions of π

To calculate the convergents of pi
Pi
' is a mathematical constant that is the ratio of any circle's circumference to its diameter. is approximately equal to 3.14. Many formulae in mathematics, science, and engineering involve , which makes it one of the most important mathematical constants...

 we may set , define and , and , . Continuing like this, one can determine the infinite continued fraction of π as
[3; 7, 15, 1, 292, 1, 1, ...] .

The third convergent of π is [3; 7, 15, 1] = 355/113 = 3.14159292035..., sometimes called Milü, which is fairly close to the true value of π.

Let us suppose that the quotients found are, as above, [3; 7, 15, 1]. The following is a rule by which we can write down at once the convergent fractions which result from these quotients without developing the continued fraction.

The first quotient, supposed divided by unity, will give the first fraction, which will be too small, namely, 3/1. Then, multiplying the numerator and denominator of this fraction by the second quotient and adding unity to the numerator, we shall have the second fraction, 22/7, which will be too large. Multiplying in like manner the numerator and denominator of this fraction by the third quotient, and adding to the numerator the numerator of the preceding fraction, and to the denominator the denominator of the preceding fraction, we shall have the third fraction, which will be too small. Thus, the third quotient being 15, we have for our numerator (22 × 15 = 330) + 3 = 333, and for our denominator, (7 × 15 = 105) + 1 = 106. The third convergent, therefore, is 333/106. We proceed in the same manner for the fourth convergent. The fourth quotient being 1, we say 333 times 1 is 333, and this plus 22, the numerator of the fraction preceding, is 355; similarly, 106 times 1 is 106, and this plus 7 is 113.

In this manner, by employing the four quotients [3; 7, 15, 1], we obtain the four fractions:


These convergents are alternately smaller and larger than the true value of π, and approach nearer and nearer to π. The difference between a given convergent and π is less than the reciprocal of the product of the denominators of that convergent and the next convergent. For example, the fraction 22/7 is greater than π, but 22/7 − π is less than 1/(7×106), that is 1/742 (in fact, 22/7 − π is just less than 1/790).

The demonstration of the foregoing properties is deduced from the fact that if we seek the difference between one of the convergent fractions and the next adjacent to it we shall obtain a fraction of which the numerator is always unity and the denominator the product of the two denominators. Thus the difference between 22/7 and 3/1 is 1/7, in excess; between 333/106 and 22/7, 1/742, in deficit; between 355/113 and 333/106, 1/11978, in excess; and so on. The result being, that by employing this series of differences we can express in another and very simple manner the fractions with which we are here concerned, by means of a second series of fractions of which the numerators are all unity and the denominators successively be the product of every two adjacent denominators. Instead of the fractions written above, we have thus the series:


The first term, as we see, is the first fraction; the first and second together give the second fraction, 22/7; the first, the second and the third give the third fraction 333/106, and so on with the rest; the result being that the series entire is equivalent to the original value.

Generalized continued fraction

A generalized continued fraction is an expression of the form


where the an (n > 0) are the partial numerators, the bn are the partial denominators, and the leading term b0 is called the integer part of the continued fraction.

To illustrate the use of generalized continued fractions, consider the following example. The sequence of partial denominators of the simple continued fraction of π does not show any obvious pattern:
or

However, several generalized continued fractions for π have a perfectly regular structure, such as:


The first two of these are special cases of the arctangent function with
π = 4 arctan 1.

Periodic continued fractions

The numbers with periodic continued fraction expansion are precisely the irrational solutions
Quadratic irrational
In mathematics, a quadratic irrational is an irrational number that is the solution to some quadratic equation with rational coefficients...

 of quadratic equation
Quadratic equation
In mathematics, a quadratic equation is a univariate polynomial equation of the second degree. A general quadratic equation can be written in the formax^2+bx+c=0,\,...

s with rational coefficients (rational solutions have finite continued fraction expansions as previously stated). The simplest examples are the golden ratio
Golden ratio
In mathematics and the arts, two quantities are in the golden ratio if the ratio of the sum of the quantities to the larger quantity is equal to the ratio of the larger quantity to the smaller one. The golden ratio is an irrational mathematical constant, approximately 1.61803398874989...

 φ = [1; 1, 1, 1, 1, 1, ...] and √ 2 = [1; 2, 2, 2, 2, ...]; while √14 = [3;1,2,1,6,1,2,1,6...] and √42 = [6;2,12,2,12,2,12...]. All irrational square roots of integers have a special form for the period; a symmetrical string, like the empty string (for √ 2) or 1,2,1 (for √14), followed by the double of the leading integer.

A property of the golden ratio φ

Because the continued fraction expansion for φ
Golden ratio
In mathematics and the arts, two quantities are in the golden ratio if the ratio of the sum of the quantities to the larger quantity is equal to the ratio of the larger quantity to the smaller one. The golden ratio is an irrational mathematical constant, approximately 1.61803398874989...

 doesn't use any integers greater than 1, φ is one of the most "difficult" real numbers to approximate with rational numbers. One theorem states that any real number k can be approximated by rational m/n with


While virtually all real numbers k will eventually have infinitely many convergents m/n whose distance from k is significantly smaller than this limit, the convergents for φ (i.e., the numbers 5/3, 8/5, 13/8, 21/13, etc.) consistently "toe the boundary", keeping a distance of almost exactly away from φ, thus never producing an approximation nearly as impressive as, for example, 355/113 for π. It can also be shown that every real number of the form (a + bφ)/(c + dφ) – where a, b, c, and d are integers such that ad − bc = ±1 – shares this property with the golden ratio φ; and that all other real numbers can be more closely approximated.

Regular patterns in continued fractions

While one cannot discern any pattern in the simple continued fraction expansion of π, this is not true for e, the base of the natural logarithm
E (mathematical constant)
The mathematical constant ' is the unique real number such that the value of the derivative of the function at the point is equal to 1. The function so defined is called the exponential function, and its inverse is the natural logarithm, or logarithm to base...

:


which is a special case of this general expression for positive integer n:


Another, more complex pattern appears in this continued fraction expansion for positive odd n:


with a special case for n = 1:


Other continued fractions of this sort are


where n is a positive integer; also, for integral n:


with a special case for n = 1:


If In(x) is the modified, or hyperbolic, Bessel function
Bessel function
In mathematics, Bessel functions, first defined by the mathematician Daniel Bernoulli and generalized by Friedrich Bessel, are canonical solutions y of Bessel's differential equation:...

 of the first kind, we may define a function on the rationals p/q by


which is defined for all rational numbers, with p and q in lowest terms. Then for all nonnegative rationals, we have


with similar formulas for negative rationals; in particular we have


Many of the formulas can be proved using Gauss's continued fraction.

Typical continued fractions

Most irrational numbers do not have any periodic or regular behavior in their continued fraction expansion. Nevertheless Khinchin proved that for almost all
Almost all
In mathematics, the phrase "almost all" has a number of specialised uses."Almost all" is sometimes used synonymously with "all but finitely many" or "all but a countable set" ; see almost....

 real numbers x, the ai (for i = 1, 2, 3, ...) have an astonishing property: their geometric mean
Geometric mean
The geometric mean, in mathematics, is a type of mean or average, which indicates the central tendency or typical value of a set of numbers. It is similar to the arithmetic mean, except that the numbers are multiplied and then the nth root of the resulting product is taken.For instance, the...

 is a constant (known as Khinchin's constant, K ≈ 2.6854520010...) independent of the value of x. Paul Lévy
Paul Pierre Lévy
Paul Pierre Lévy was a Jewish French mathematician who was active especially in probability theory, introducing martingales and Lévy flights...

 showed that the nth root of the denominator of the nth convergent of the continued fraction expansion of almost all real numbers approaches an asymptotic limit, which is known as Lévy's constant
Lévy's constant
In mathematics Lévy's constant occurs in an expression for the asymptotic behaviour of the denominators of the convergents of continued fractions....

. Lochs' theorem
Lochs' theorem
In number theory, Lochs' theorem is a theorem concerning the rate of convergence of the continued fraction expansion of a typical real number. The theorem was proved by Gustav Lochs in 1964....

 states that nth convergent of the continued fraction expansion of almost all real numbers determines the number to an average accuracy of just over n decimal places.

Pell's equation

Continued fractions play an essential role in the solution of Pell's equation
Pell's equation
Pell's equation is any Diophantine equation of the formx^2-ny^2=1\,where n is a nonsquare integer. The word Diophantine means that integer values of x and y are sought. Trivially, x = 1 and y = 0 always solve this equation...

. For example, for positive integers p and q, p2 − 2q2 = ±1 only if p/q is a convergent of √2.

Continued fractions and chaos

Continued fractions also play a role in the study of chaos
Chaos theory
Chaos theory is a field of study in mathematics, with applications in several disciplines including physics, economics, biology, and philosophy. Chaos theory studies the behavior of dynamical systems that are highly sensitive to initial conditions, an effect which is popularly referred to as the...

, where they tie together the Farey fractions
Farey sequence
In mathematics, the Farey sequence of order n is the sequence of completely reduced fractions between 0 and 1 which, when in lowest terms, have denominators less than or equal to n, arranged in order of increasing size....

 which are seen in the Mandelbrot set
Mandelbrot set
The Mandelbrot set is a particular mathematical set of points, whose boundary generates a distinctive and easily recognisable two-dimensional fractal shape...

 with Minkowski's question mark function
Minkowski's question mark function
In mathematics, the Minkowski question mark function, sometimes called the slippery devil's staircase and denoted by ?, is a function possessing various unusual fractal properties, defined by Hermann Minkowski in 1904...

 and the modular group
Modular group
In mathematics, the modular group Γ is a fundamental object of study in number theory, geometry, algebra, and many other areas of advanced mathematics...

 Gamma.

The backwards shift operator
Shift operator
In mathematics, and in particular functional analysis, the shift operator or translation operator is an operator that takes a function to its translation . In time series analysis, the shift operator is called the lag operator....

 for continued fractions is the map
Map (mathematics)
In most of mathematics and in some related technical fields, the term mapping, usually shortened to map, is either a synonym for function, or denotes a particular kind of function which is important in that branch, or denotes something conceptually similar to a function.In graph theory, a map is a...

  called the Gauss map, which lops off digits of a continued fraction expansion: . The transfer operator
Transfer operator
In mathematics, the transfer operator encodes information about an iterated map and is frequently used to study the behavior of dynamical systems, statistical mechanics, quantum chaos and fractals...

 of this map is called the Gauss–Kuzmin–Wirsing operator. The distribution of the digits in continued fractions is given by the zero'th eigenvector of this operator, and is called the Gauss–Kuzmin distribution.

Eigenvalues and eigenvectors

The Lanczos algorithm
Lanczos algorithm
The Lanczos algorithm is an iterative algorithm invented by Cornelius Lanczos that is an adaptation of power methods to find eigenvalues and eigenvectors of a square matrix or the singular value decomposition of a rectangular matrix. It is particularly useful for finding decompositions of very...

 uses a continued fraction expansion to iteratively approximate the eigenvalues and eigenvectors of a large sparse matrix.

History of continued fractions

  • 300 BC Euclid's Elements
    Euclid's Elements
    Euclid's Elements is a mathematical and geometric treatise consisting of 13 books written by the Greek mathematician Euclid in Alexandria c. 300 BC. It is a collection of definitions, postulates , propositions , and mathematical proofs of the propositions...

    contains an algorithm for the greatest common divisor
    Greatest common divisor
    In mathematics, the greatest common divisor , also known as the greatest common factor , or highest common factor , of two or more non-zero integers, is the largest positive integer that divides the numbers without a remainder.For example, the GCD of 8 and 12 is 4.This notion can be extended to...

     which generates a continued fraction as a by-product
  • 499 The Aryabhatiya
    Aryabhatiya
    Āryabhaṭīya or Āryabhaṭīyaṃ, a Sanskrit astronomical treatise, is the magnum opus and only extant work of the 5th century Indian mathematician, Āryabhaṭa.- Structure and style:...

    contains the solution of indeterminate equations using continued fractions
  • 1579 Rafael Bombelli
    Rafael Bombelli
    Rafael Bombelli was an Italian mathematician.Born in Bologna, he is the author of a treatise on algebra and is a central figure in the understanding of imaginary numbers....

    , L'Algebra Opera – method for the extraction of square roots which is related to continued fractions
  • 1613 Pietro Cataldi
    Pietro Cataldi
    Pietro Antonio Cataldi was an Italian mathematician. A citizen of Bologna, he taught mathematics and astronomy and also worked on military problems. His work included the development of continued fractions and a method for their representation. He was one of many mathematicians who attempted to...

    , Trattato del modo brevissimo di trovar la radice quadra delli numeri – first notation for continued fractions
Cataldi represented a continued fraction as & & & with the dots indicating where the following fractions went.
  • 1695 John Wallis, Opera Mathematica – introduction of the term "continued fraction"
  • 1737 Leonhard Euler
    Leonhard Euler
    Leonhard Euler was a pioneering Swiss mathematician and physicist. He made important discoveries in fields as diverse as infinitesimal calculus and graph theory. He also introduced much of the modern mathematical terminology and notation, particularly for mathematical analysis, such as the notion...

    , De fractionibus continuis dissertatio – Provided the first then-comprehensive account of the properties of continued fractions, and included the first proof that the number e
    E (mathematical constant)
    The mathematical constant ' is the unique real number such that the value of the derivative of the function at the point is equal to 1. The function so defined is called the exponential function, and its inverse is the natural logarithm, or logarithm to base...

     is irrational.
  • 1748 Euler, Introductio in analysin infinitorum. Vol. I, Chapter 18 – proved the equivalence of a certain form of continued fraction and a generalized infinite series, proved that every rational number can be written as a finite continued fraction, and proved that the continued fraction of an irrational number is infinite.
  • 1761 Johann Lambert – gave the first proof of the irrationality of π
    Pi
    ' is a mathematical constant that is the ratio of any circle's circumference to its diameter. is approximately equal to 3.14. Many formulae in mathematics, science, and engineering involve , which makes it one of the most important mathematical constants...

     using a continued fraction for tan(x).
  • 1768 Joseph Louis Lagrange
    Joseph Louis Lagrange
    Joseph-Louis Lagrange , born Giuseppe Lodovico Lagrangia, was a mathematician and astronomer, who was born in Turin, Piedmont, lived part of his life in Prussia and part in France, making significant contributions to all fields of analysis, to number theory, and to classical and celestial mechanics...

     – provided the general solution to Pell's equation using continued fractions similar to Bombelli's
  • 1770 Lagrange – proved that quadratic irrationals have a periodic continued fraction expansion
  • 1813 Carl Friedrich Gauss
    Carl Friedrich Gauss
    Johann Carl Friedrich Gauss was a German mathematician and scientist who contributed significantly to many fields, including number theory, statistics, analysis, differential geometry, geodesy, geophysics, electrostatics, astronomy and optics.Sometimes referred to as the Princeps mathematicorum...

    , Werke, Vol. 3, pp. 134–138 – derived a very general complex-valued continued fraction via a clever identity involving the hypergeometric function
  • 1892 Henri Padé
    Henri Padé
    Henri Eugène Padé was a French mathematician, who is now remembered mainly for his development of approximation techniques for functions using rational functions.He was educated at École Normale Supérieure in Paris...

     defined Padé approximant
    Padé approximant
    Padé approximant is the "best" approximation of a function by a rational function of given order - under this technique, the approximant's power series agrees with the power series of the function it is approximating....

  • 1972 Bill Gosper
    Bill Gosper
    Ralph William Gosper, Jr. , known as Bill Gosper, is an American mathematician and programmer from Pennsauken Township, New Jersey...

     – First exact algorithms for continued fraction arithmetic.

See also

  • Stern–Brocot tree
  • Computing continued fractions of square roots
  • Complete quotient
    Complete quotient
    In the metrical theory of regular continued fractions, the kth complete quotient ζ k is obtained by ignoring the first k partial denominators ai...

  • Engel expansion
  • Generalized continued fraction
    Generalized continued fraction
    In complex analysis, a branch of mathematics, a generalized continued fraction is a generalization of regular continued fractions in canonical form, in which the partial numerators and partial denominators can assume arbitrary real or complex values....

  • Mathematical constants (sorted by continued fraction representation)
    Mathematical constants (sorted by continued fraction representation)
    This is a list of mathematical constants sorted by their representations as continued fractions.Continued fractions with more than 20 known terms have been truncated, with an ellipsis to show that they continue. Rational numbers have two continued fractions; the version in this list is the shorter...

  • Restricted partial quotients
  • Infinite series
  • Infinite product
  • Iterated binary operation
    Iterated binary operation
    In mathematics, an iterated binary operation is an extension of a binary operation on a set S to a function on finite sequences of elements of S through repeated application. Common examples include the extension of the addition operation to the summation operation, and the extension of the...

  • Euler's continued fraction formula
    Euler's continued fraction formula
    In the analytic theory of continued fractions, Euler's continued fraction formula is an identity connecting a certain very general infinite series with an infinite continued fraction. First published in 1748, it was at first regarded as a simple identity connecting a finite sum with a finite...

  • Śleszyński–Pringsheim theorem
    Śleszyński–Pringsheim theorem
    In mathematics, the Śleszyński–Pringsheim theorem is a statement about convergence of certain continued fractions. It was discovered by Ivan Śleszyński and Alfred Pringsheim in the late 19th century....


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK