Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Simple continued fraction
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Motivation and notation== Consider, for example, the [[rational number]] {{sfrac|415|93}}, which is around 4.4624. As a first [[approximation]], start with 4, which is the [[Floor and ceiling functions|integer part]]; {{nowrap|1={{sfrac|415|93}} = 4 + {{sfrac|43|93}}}}. The fractional part is the [[Multiplicative inverse|reciprocal]] of {{sfrac|93|43}} which is about 2.1628. Use the integer part, 2, as an approximation for the reciprocal to obtain a second approximation of {{nowrap |1=4 + {{sfrac|1|2}} = 4.5. Now, {{sfrac|93|43}} = 2 + {{sfrac|7|43}}}}; the remaining fractional part, {{sfrac|7|43}}, is the reciprocal of {{sfrac|43|7}}, and {{sfrac|43|7}} is around 6.1429. Use 6 as an approximation for this to obtain {{nowrap|2 + {{sfrac|1|6}}}} as an approximation for {{sfrac|93|43}} and {{nowrap|4 + {{sfrac|1|2 + {{sfrac|1|6}}}}}}, about 4.4615, as the third approximation. Further, {{nowrap|1={{sfrac|43|7}} = 6 + {{sfrac|1|7}}}}. Finally, the fractional part, {{sfrac|1|7}}, is the reciprocal of 7, so its approximation in this scheme, 7, is exact ({{nowrap|1={{sfrac|7|1}} = 7 + {{sfrac|0|1}}}}) and produces the exact expression <math display=block> 4 + \cfrac1{2 + \cfrac1{6 + \cfrac17}} </math> for {{sfrac|415|93}}. That expression is called the continued fraction representation of {{sfrac|415|93}}. This can be represented by the abbreviated notation {{sfrac|415|93}} = [4; 2, 6, 7]. It is customary to place a semicolon after the first number to indicate that it is the whole part. Some older textbooks use all commas in the {{math|(''n'' + 1)}}-tuple, for example, [4, 2, 6, 7].{{sfn|Long|1972|p=173}}{{sfn|Pettofrezzo|Byrkit|1970|p=152}} If the starting number is rational, then this process exactly parallels the [[Euclidean algorithm]] applied to the numerator and denominator of the number. In particular, it must terminate and produce a finite continued fraction representation of the number. The sequence of integers that occur in this representation is the sequence of successive quotients computed by the Euclidean algorithm. If the starting number is [[Irrational number|irrational]], 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: * {{math|1={{sqrt|19}} = [4;2,1,3,1,2,8,2,1,3,1,2,8,...]}} {{OEIS|A010124}}. The pattern repeats indefinitely with a period of 6. * {{math|1=[[e (mathematical constant)|''e'']] = [2;1,2,1,1,4,1,1,6,1,1,8,...]}} {{OEIS|A003417}}. The pattern repeats indefinitely with a period of 3 except that 2 is added to one of the terms in each cycle. * {{math|1=[[Pi|π]] = [3;7,15,1,292,1,1,1,2,1,3,1,...]}} {{OEIS|A001203}}. No pattern has ever been found in this representation. * {{math|1=[[golden ratio|φ]] = [1;1,1,1,1,1,1,1,1,1,1,1,...]}} {{OEIS|A000012}}. The [[golden ratio]], the irrational number that is the "most difficult" to approximate rationally {{crossreference|(see [[#A property of the golden ratio φ|{{nowrap|§{{tsp}}A}} property of the golden ratio φ]] below)}}. * {{math|1=[[Euler–Mascheroni constant|γ]] = [0;1,1,2,1,2,1,4,3,13,5,1,...]}} {{OEIS|A002852}}. The [[Euler–Mascheroni constant]], which is expected but not known to be irrational, and whose continued fraction has no apparent pattern. Continued fractions are, in some ways, more "mathematically natural" representations of a [[real number]] than other representations such as [[decimal representation]]s, and they have several desirable properties: * The continued fraction representation for a real number is finite if and only if it is a rational number. In contrast, the decimal representation of a rational number may be finite, for example {{nowrap|1={{sfrac|137|1600}} = 0.085625}}, or infinite with a repeating cycle, for example {{nowrap|1={{sfrac|4|27}} = 0.148148148148...}} * Every rational number has an essentially unique simple continued fraction representation. Each rational can be represented in exactly two ways, since {{math|1=[''a''<sub>0</sub>;''a''<sub>1</sub>,... ''a''<sub>''n''−1</sub>,''a''<sub>''n''</sub>] = [''a''<sub>0</sub>;''a''<sub>1</sub>,... ''a''<sub>''n''−1</sub>,(''a''<sub>''n''</sub>−1),1]}}. Usually the first, shorter one is chosen as the [[canonical form|canonical representation]]. * The simple continued fraction representation of an irrational number is unique. (However, additional representations are possible when using ''generalized'' continued fractions; see below.) * The real numbers whose continued fraction eventually repeats are precisely the [[quadratic irrational]]s.{{sfn|Weisstein|2022}} For example, the repeating continued fraction {{nowrap|[1;1,1,1,...]}} is the [[golden ratio]], and the repeating continued fraction {{nowrap|[1;2,2,2,...]}} is the [[square root of 2]]. In contrast, the decimal representations of quadratic irrationals are apparently [[normal number|random]]. The square roots of all (positive) integers that are not perfect squares are quadratic irrationals, and hence are unique periodic continued fractions. * The successive approximations generated in finding the continued fraction representation of a number, that is, by truncating the continued fraction representation, are in a certain sense (described below) the "best possible".
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)