section_path: Fundamentals/Continued fractions
section_name: Continued fractions
paragraph_text: Continued fractions
  
  As an irrational number, π cannot be represented as a common fraction. But every number, including π, can be represented by an infinite series of nested fractions, called a continued fraction: π = 3 + 1 7 + 1 15 + 1 1 + 1 292 + 1 1 + 1 1 + 1 1 + ⋱ {\displaystyle \pi =3+\textstyle {\cfrac {1}{7+\textstyle {\cfrac {1}{15+\textstyle {\cfrac {1}{1+\textstyle {\cfrac {1}{292+\textstyle {\cfrac {1}{1+\textstyle {\cfrac {1}{1+\textstyle {\cfrac {1}{1+\ddots }}}}}}}}}}}}}}}
  
  Truncating the continued fraction at any point yields a rational approximation for π; the first four of these are 3, 22 / 7, 333 / 106, and 355 / 113. These numbers are among the best-known and most widely used historical approximations of the constant. Each approximation generated in this way is a best rational approximation; that is, each is closer to π than any other fraction with the same or a smaller denominator. Because π is transcendental, it is by definition not algebraic and so cannot be a quadratic irrational. Therefore, π cannot have a periodic continued fraction. Although the simple continued fraction for π (shown above) also does not exhibit any other obvious pattern, several generalized continued fractions do, such as: π = 3 + 1 2 6 + 3 2 6 + 5 2 6 + 7 2 6 + ⋱ = 4 1 + 1 2 2 + 3 2 2 + 5 2 2 + ⋱ = 4 1 + 1 2 3 + 2 2 5 + 3 2 7 + ⋱ {\displaystyle {\begin{aligned}\pi &=3+{\cfrac {1^{2}}{6+{\cfrac {3^{2}}{6+{\cfrac {5^{2}}{6+{\cfrac {7^{2}}{6+\ddots }}}}}}}}={\cfrac {4}{1+{\cfrac {1^{2}}{2+{\cfrac {3^{2}}{2+{\cfrac {5^{2}}{2+\ddots }}}}}}}}={\cfrac {4}{1+{\cfrac {1^{2}}{3+{\cfrac {2^{2}}{5+{\cfrac {3^{2}}{7+\ddots }}}}}}}}\end{aligned}}}
  
  The middle of these is due to the mid-17th century mathematician William Brouncker, see § Brouncker's formula.