Simple continued fraction

A simple or regular continued fraction is a continued fraction with numerators all equal one, and denominators built from a sequence of integer numbers. The sequence can be finite or infinite, resulting in a finite (or terminated) continued fraction like

or an infinite continued fraction like

Typically, such a continued fraction is obtained through an iterative process of representing a number as the sum of its integer part and the reciprocal of another number, then writing this other number as the sum of its integer part and another reciprocal, and so on. In the finite case, the iteration/recursion is stopped after finitely many steps by using an integer in lieu of another continued fraction. In contrast, an infinite continued fraction is an infinite expression. In either case, all integers in the sequence, other than the first, must be positive. The integers are called the coefficients or terms of the continued fraction.[1]

Simple continued fractions have a number of remarkable properties related to the Euclidean algorithm for integers or real numbers. Every rational number / has two closely related expressions as a finite continued fraction, whose coefficients ai can be determined by applying the Euclidean algorithm to . The numerical value of an infinite continued fraction is irrational; it is defined from its infinite sequence of integers as the limit 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 regular continued fraction, whose coefficients can be found using the non-terminating version of the Euclidean algorithm applied to the incommensurable values and 1. This way of expressing real numbers (rational and irrational) is called their continued fraction representation.