# Continued fractions

## Continued fractions Topics

Sort by:

### Gauss's continued fraction

Gauss's continued fraction is given by the continuedfractionwhere is a hypergeometric function. Many analytic expressions for continued fractions of functions can be derived from this formula.

### Simple continued fraction

A simple continued fraction is a special case of a generalized continued fraction for which the partial numerators are equal to unity, i.e., for all , 2, .... A simple continued fraction is therefore an expression of the form(1)When used without qualification, the term "continued fraction" is often used to mean "simple continued fraction" or, more specifically, regular (i.e., a simple continued fraction whose partial denominators , , ... are positive integer; Rockett and Szüsz 1992, p. 3). Care must therefore be taken to identify the intended meaning based on the context in which such terminology is encountered.A simple continued fraction can be written in a compact abbreviated notationas(2)or(3)where may be finite (for a finite continued fraction) or (for an infinite continued fraction). In contexts where only simple continued fractions are considered, the partial denominators are often denoted..

### Lochs' theorem

For a real number , let be the number of terms in the convergent to a regular continued fraction that are required to represent decimal places of . Then for almost all ,(1)(2)(OEIS A086819; Lochs 1964). This number issometimes known as Lochs' constant.Therefore, the regular continued fraction is only slightly more efficient at representing real numbers than is the decimal expansion. The set of for which this statement does not hold is of measure 0.

### L&eacute;vy constant

The nth root of the denominator of the th convergent of a number tends to a constant(1)(2)(3)(OEIS A086702) for all but a set of of measure zero (Lévy 1936, Lehmer 1939), where(4)(5)Some care is needed in terminology and notation related to this constant. Most authors call "Lévy's constant" (e.g., Le Lionnais 1983, p. 51; Sloane) and some (S. Plouffe) call the "Khinchin-Lévy constant." Other authors refer to (e.g., Finch 2003, p. 60) or (e.g., Wu 2008) without specifically naming the expression in question.Taking the multiplicative inverse of gives another related constant,(6)(7)(OEIS A089729).Corless (1992) showed that(8)with an analogous formula for Khinchin's constant.The Lévy Constant is related to Lochs' constant by(9)or(10)The plot above shows for the first 500 terms in the continued fractions of , , the Euler-Mascheroni constant , and the Copeland-Erdős..

### Euler's continued fraction

Euler's continued fraction is the name given by Borwein et al. (2004, p. 30)to Euler's formula for the inverse tangent,An even more famous continued fraction related to Euler which is perhaps a more appropriate recipient of the appellation "Euler's continued fraction" is the simple continued fraction for e, namely

### Lehner continued fraction

A Lehner continued fraction is a generalizedcontinued fraction of the formwhere or (2, ) for an irrational number (Lehner 1994, Dajani and Kraaikamp).

### Engel expansion

The Engel expansion, also called the Egyptian product, of a positive real number is the unique increasing sequence of positive integers such thatThe following table gives the Engel expansions of Catalan's constant, e, the Euler-Mascheroni constant , , and the golden ratio .constantOEISEngel expansionA0282541, 3, 5, 5, 16, 18, 78, 102, 120, ...A0282571, 2, 3, 3, 6, 17, 23, 25, 27, 73, ...A1182391, 2, 12, 30, 56, 90, 132, 182, ...A0000271, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ...A0591933, 10, 28, 54, 88, 130, 180, 238, 304, 378, ...A0539772, 7, 13, 19, 85, 2601, 9602, 46268, 4812284, ...A0545432, 2, 2, 4, 4, 5, 5, 12, 13, 41, 110, ...A0591802, 3, 7, 9, 104, 510, 1413, 2386, ...A0282591, 2, 5, 6, 13, 16, 16, 38, 48, 58, 104, ...A0067841, 1, 1, 8, 8, 17, 19, 300, 1991, 2492, ...A0140124, 4, 11, 45, 70, 1111, 4423, 5478, 49340, ...A0683771, 6, 20, 42, 72, 110, 156, 210, ...A1183262, 2, 22, 50, 70, 29091, 49606, 174594, ... has a very regular Engel expansion, namely..

### Regular continued fraction

A regular continued fraction is a simplecontinued fraction(1)(2)(3)where is an integer and is a positive integer for (Rockett and Szüsz 1992, p. 3).While regular continued fractions are not the only possible representation of real numbers in terms of a sequence of integers (others include the decimal expansion and Engel expansion), they are a very common such representation that arises most frequently in number theory. Lochs' theorem relates the efficiency of a regular continued fraction expansion with that of a decimal expansion in representing a real number.A finite regular continued fraction representation terminates after a finite number of terms and therefore corresponds to a rational number. (Bach and Shallit (1996) show how to compute the Jacobi symbol in terms of the simple continued fraction of a rational number .) On the other hand, an infinite regular continued fraction represents a unique irrational number,..

### Ramanujan continued fractions

Ramanujan developed a number of interesting closed-form expressions for generalized continued fractions. These include the almost integers(1)(2)(3)(OEIS A091667; Watson 1929, 1931; Hardy 1999, p. 8), where is the golden ratio, its multiplicative inverse(4)(5)(6)(OEIS A091899; Ramanathan 1984), and(7)(8)(OEIS A091668; Watson 1929, 1931; Ramanathan 1984; Berndt and Rankin 1995, p. 57; Hardy 1999, p. 8) and its multiplicative inverse(9)(10)(OEIS A091900).Other examples include the integrals(11)(12)(13)(14)(OEIS A091659; Preece 1931; Perron 1953; Berndt and Rankin 1995, pp. 57 and 65; Hardy 1999, p. 8), where is the Hurwitz zeta function and is the trigamma function, and(15)(16)(17)(OEIS A091660; Preece 1931; Perron 1953; Berndt and Rankin 1995, pp. 57 and 65), where is a polygamma function...

### Pierce expansion

The Pierce expansion, or alternated Egyptian product, of a real number is the unique increasing sequence of positive integers such that(1)A number has a finite Pierce expansion iff is rational.Special cases are summarized in the following table.OEISPierce expansionA0918311, 3, 8, 33, 35, 39201, 39203, 60245508192801, ...Catalan's constant A1322011, 11, 13, 59, 582, 12285, 127893, 654577, ...A1182391, 2, 12, 30, 56, 90, 132, 182, 240, ...A0207252, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ...Euler-Mascheroni constant A0062841, 2, 6, 13, 21, 24, 225, 615, 17450, ...natural logarithm of 2 A0918461, 3, 12, 21, 51, 57, 73, 85, 96, ...A1182421, 2, 4, 17, 19, 5777, 5779, 192900153617, ...A0062833, 22, 118, 383, 571, 635, 70529, ...1, 2, 3, 8, 9, 24, 37, 85, ...A0683771, 6, 20, 42, 72, 110, 156, 210, 272, ...If is of the form(2)then there is a closed-form for the Pierce expansion given by(3)where(4)(5)and (Shallit 1984). This recurrence has explicit solution(6)not..

### Convergent

The word "convergent" has a number of different meanings in mathematics.Most commonly, it is an adjective used to describe a convergent sequence or convergent series, where it essentially means that the respective series or sequence approaches some limit (D'Angelo and West 2000, p. 259).The rational number obtained by keeping only a limited number of terms in a continued fraction is also called a convergent. For example, in the simple continued fraction for the golden ratio,(1)the convergents are(2)Convergents are commonly denoted , , (ratios of integers), or (a rational number).Given a simple continued fraction , the th convergent is given by the following ratio of tridiagonal matrix determinants:(3)For example, the third convergent of is(4)In the Wolfram Language, Convergents[terms] gives a list of the convergents corresponding to the specified list of continued fraction terms, while Convergents[x, n] gives..

### Continued fraction constants

A number of closed-form constants can be obtained for generalized continued fractions having particularly simple partial numerators and denominators.The Ramanujan continued fractions provide a fascinating class of continued fraction constants. The Trott constants are unexpected constants whose partial numerators and denominators correspond to their decimal digits (though to achieve this, it is necessary to allow some partial numerators to equal 0).The first in a series of other famous continued fraction constants is the infiniteregular continued fraction(1)(2)The first few convergents of the constant are 0, 1, 2/3, 7/10, 30/43, 157/225, 972/1393, 6961/9976, ... (OEIS A001053 and A001040).Both numerator and denominator satisfy the recurrence relation(3)where has the initial conditions , and has the initial conditions , . These can be solved exactly to yield(4)(5)(6)(7)where is a modified Bessel function of the first kind..

### Periodic continued fraction

A periodic continued fraction is a continued fraction (generally a regular continued fraction) whose terms eventually repeat from some point onwards. The minimal number of repeating terms is called the period of the continued fraction. All nontrivial periodic continued fractions represent irrational numbers. In general, an infinite simple fraction (periodic or otherwise) represents a unique irrational number, and each irrational number has a unique infinite continued fraction.The square root of a squarefree integer has a periodic continued fraction of the form(1)(Rose 1994, p. 130), where the repeating portion (excluding the last term) is symmetric upon reversal, and the central term may appear either once or twice.If is not a square number, then the terms of the continued fraction of satisfy(2)An even stronger result is that a continued fraction is periodic iff it is a root of a quadratic polynomial. Calling the portion of..

### Partial numerator

The th partial numerator in a generalized continued fractionis the expression . For a simple continued fractionthe partial numerators are all unity: .

### Partial denominator

The th partial denominator in a generalized continued fractionor simple continued fractionis the expression . For a simple continued fraction, the partial denominator is sometimes also called the partial quotient (e.g., Rocket and Szüsz 1992, p. 1).

### Brjuno number

Let be the sequence of convergents of the continued fraction of a number . Then a Brjuno number is an irrational number such that(Marmi et al. 1997, 2001). Brjuno numbers arise in the study of one-dimensional analytic small divisors problems, and Brjuno (1971, 1972) proved that all "germs" with linear part are linearizable if is a Brjuno number. Yoccoz (1995) proved that this condition is also necessary.

### Noble number

A noble number is defined as an irrational number having a continued fraction that becomes an infinite sequence of 1s at some point, The prototype is the inverse of the golden ratio , whose continued fraction is composed entirely of 1s (except for the term), .Any noble number can be written aswhere and are the numerator and denominator of the th convergent of .The noble numbers are a subset of but not a subfield, since there is no subfield lying properly between and . To see this, consider , which must be contained in the same field as but is not a noble number since its continued fraction is .

### Nearest integer continued fraction

Every irrational number can be expanded in a unique continued fraction expansionsuch that , , , and for . This continued fraction expansion is known as the nearest integer continued fraction expansion of .For example, the nearest integer continued fraction expansion of eis given by

### Generalized continued fraction

A generalized continued fraction is an expression of the form(1)where the partial numerators and partial denominators may in general be integers, real numbers, complex numbers, or functions (Rockett and Szüsz, 1992, p. 1). Generalized continued fractions may also be written in the forms(2)or(3)Note that letters other than are sometimes also used; for example, the documentation for ContinuedFractionK[f, g, i, imin, imax] in the Wolfram Language uses .Padé approximants provide another method of expanding functions, namely as a ratio of two power series. The quotient-difference algorithm allows interconversion of continued fraction, power series, and rational function approximations.A small sample of closed-form continued fraction constants is given in the following table (cf. Euler 1775). The Ramanujan continued fractions provide another fascinating class of continued fraction constants, and the Rogers-Ramanujan..

### Near noble number

A near noble number is a real number whose continued fraction is periodic, and the periodic sequence of terms is composed of a string of 1s followed by an integer ,(1)This can be written in the form(2)which can be solved to give(3)where is a Fibonacci number.Special cases include(4)(5)

### Gaussian brackets

Gaussian brackets are notation published by Gauss in Disquisitiones Arithmeticaeand defined by(1)(2)(3)(4)Gaussian brackets are useful for computing simplecontinued fractions because(5)(6)Note that the Gaussian bracket notation corresponds to a different quantity than that denoted by the more established simple continued fraction notation(7)

### Natural logarithm of 10 continued fraction

The continued fraction for is [0; 1, 2, 3, 1, 6, 3, 1, 1, 2, 1, 1, 1, 1, 3, 10, ...] (OEIS A016730).The Engel expansion is 2, 3, 7, 9, 104, 510, 1413,... (OEIS A059180).The incrementally largest terms in the continued fraction of are 2, 3, 6, 26, 716, 774, 982, 1324, 4093, 10322, ... (OEIS A228346), which occur at positions 0, 1, 7, 17, 30, 136, 962, 1163, 1261, 1293, ... (OEIS A228345).The plot above shows the positions of the first occurrences of 1, 2, 3, ... in the continued fraction, the first few of which are 4, 0, 1, 11, 18, 7, 44, 159, 74, 212, 260, 182, 43, 152, 59, 84, 40, 86, 27, 89, ... (OEIS A228270). The smallest number not occurring in the first terms of the continued fraction are 40230, 45952, 46178, 46530, ... (E. Weisstein, Aug. 18, 2013).Let the continued fraction of be denoted and let the denominators of the convergents be denoted , , ..., . Then plots above show successive values of , , , which appear to converge to Khinchin's constant (left..

### Natural logarithm of 2 continued fraction

The continued fraction for is [0; 1, 2, 3, 1, 6, 3, 1, 1, 2, 1, 1, 1, 1, 3, 10, ...] (OEIS A016730). It has been computed to terms by E. Weisstein (Aug. 21, 2013).The Engel expansion is 2, 3, 7, 9, 104, 510, 1413,... (OEIS A059180).The incrementally largest terms in the continued fraction are 0, 1, 2, 3, 6, 10, 13, 14, ... (OEIS A120754), which occur at positions 0, 1, 2, 3, 5, 15, 28, ... (OEIS A120755).The plot above shows the positions of the first occurrences of 1, 2, 3, ... in the continued fraction, the first few of which are 1, 2, 3, 30, 40, 5, 29, 89, 88, 15, ... (OEIS A228269). The smallest number not occurring in the first terms of the continued fraction are 42112, 42387, 43072, 45089, ... (E. Weisstein, Aug. 21, 2013).Let the continued fraction of be denoted and let the denominators of the convergents be denoted , , ..., . Then plots above show successive values of , , , which appear to converge to Khinchin's constant (left figure)..

### Continued fraction

The term "continued fraction" is used to refer to a class of expressions of which generalized continued fraction of the form(and the terms may be integers, reals, complexes, or functions of these) are the most general variety (Rocket and Szüsz 1992, p. 1).Wallis first used the term "continued fraction" in his Arithmetica infinitorum of 1653 (Havil 2003, p. 93), although other sources list the publication date as 1655 or 1656. An archaic word for a continued fraction is anthyphairetic ratio.The simple continued fraction takes for all , leavingIf is an integer and the remainder of the partial denominators for are positive integers, the continued fraction is known as a regular continued fraction.

### Continued fraction fundamental recurrence relation

For a simple continued fraction with convergents , the fundamental recurrence relation is given by