Generalized Continued Fraction

A generalized continued fraction is an expression of the form


where the partial numerators a_1,a_2,... and partial denominators b_0,b_1,b_2,... 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




Note that letters other than a_n/b_n are sometimes also used; for example, the documentation for ContinuedFractionK[f, g, {i, imin, imax}] in the Wolfram Language uses f_n/g_n.

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 continued fraction is an example of a convergent generalized continued fraction function where a simple definition leads to quite intricate structure.

continued fractionvalueapproximateOEIS

The value


is known as the nth convergent of the continued fraction.

A regular continued fraction representation (which is usually what is meant when the term "continued fraction" is used without qualification) of a number x is one for which the partial quotients are all unity (a_n=1), b_0 is an integer, and b_1, b_2, ... are positive integers (Rockett and Szüsz, 1992, p. 3).

Euler showed that if a convergent series can be written in the form


then it is equal to the continued fraction


(Borwein et al. 2004, p. 30).

To "round" a regular continued fraction, truncate the last term unless it is +/-1, in which case it should be added to the previous term (Gosper 1972, Item 101A). To take one over a simple continued fraction, add (or possibly delete) an initial 0 term. To negate, take the negative of all terms, optionally using the identity


A particularly beautiful identity involving the terms of the continued fraction is


There are two possible representations for a finite simple fraction:

 [a_0,...,a_n]={[a_0,...,a_(n-1),a_n-1,1]   for a_n>1; [a_0,...,a_(n-2),a_(n-1)+1]   for a_n=1.

See also

Continued Fraction, Continued Fraction Constants, Convergent, Lehner Continued Fraction, Padé Approximant, Partial Denominator, Partial Numerator, Ramanujan Continued Fractions, Regular Continued Fraction, Rogers-Ramanujan Continued Fraction, Simple Continued Fraction

Explore with Wolfram|Alpha


Borwein, J.; Bailey, D.; and Girgensohn, R. Experimentation in Mathematics: Computational Paths to Discovery. Wellesley, MA: A K Peters, 2004.Gosper, R. W. "Continued fractions query." posting, Dec. 27, 1996.Gosper, R. W. Item 101a in Beeler, M.; Gosper, R. W.; and Schroeppel, R. HAKMEM. Cambridge, MA: MIT Artificial Intelligence Laboratory, Memo AIM-239, pp. 37-39, Feb. 1972., A. M. and Szüsz, P. Continued Fractions. New York: World Scientific, 1992.

Cite this as:

Weisstein, Eric W. "Generalized Continued Fraction." From MathWorld--A Wolfram Web Resource.

Subject classifications