2

I’ve developed an algorithm for generating continued fractions of real numbers ($r > \frac{1 + \sqrt{5}}{2}$) with coefficients that are monotone non-decreasing. The standard approach for continued fractions generates coefficients that may not follow this property, so I wanted to explore an alternative that maintains monotonicity while still approximating the number as closely as possible.

Algorithm Overview

Given a real number ($r > \frac{1 + \sqrt{5}}{2}$), the goal is to represent $r$ as a continued fraction of the form:

$$r = a_0 + \frac{b_0}{a_1 + \frac{b_1}{a_2 + \dots}}$$

The sequences $a_n$ and $b_n$ should be monotone non-decreasing.

Step-by-step Algorithm:

  1. Initialize $c = 1$.
  2. Set $a_0 = \left\lfloor r \right\rfloor$ (the integer part of $r$).
  3. Set $b_0 = \max\left(c, \left\lceil (r - a_0) \cdot a_0 \right\rceil\right)$, where $\lceil \cdot \rceil$ denotes the ceiling function.
  4. Update $c = b_0$, and set $r = \frac{b_0}{r - a_0}$.
  5. Repeat the steps for subsequent iterations, determining $a_n$ and $b_n$, until a desired number of iterations is reached.

Example: Continued Fraction for $\sqrt{6}$

Let's consider the number $\sqrt{6}$. Applying the algorithm, we get the following continued fraction expansion:

$$\sqrt{6} = 2 + \frac{1}{2 + \frac{1}{4 + \frac{2}{4 + \frac{2}{4 + \dots}}}}$$

This is a periodic continued fraction, and the coefficients $a_n$ and $b_n$ are monotone non-decreasing.

Comparison with the Standard Continued Fraction Algorithm

To evaluate the effectiveness of this method, I compared it with the standard continued fraction algorithm. The standard algorithm for $\pi$, for instance, gives the following continued fraction expansion:

$$\pi = [3; 7, 15, 1, 292, \dots]$$

The approximation generated by the standard algorithm after a few terms converges slowly, while the monotone non-decreasing method provides a more accurate approximation with fewer terms:

$$\pi = 3 + \frac{1}{7 + \frac{1}{15 + \frac{15}{15 + \frac{15}{292 + \dots}}}}$$

Advantages of the Algorithm

  • Monotonicity: The sequences $a_n$ and $b_n$ are guaranteed to be monotone non-decreasing, which can be useful in specific mathematical applications.
  • Faster Convergence: In many cases, the approximation generated by this algorithm converges more quickly compared to the standard continued fraction.
  • Precision: For $\pi$, for example, after 5 iterations, the error is on the order of $5.8 \times 10^{-10}$, which is much smaller than that of the standard method.

Conclusion

This algorithm offers an efficient way to generate continued fractions with monotone non-decreasing coefficients. Its fast convergence makes it a promising approach for approximating real numbers to high precision.

I ask if it is possible to link convergents of a simple continued fraction to convergents of this new expansion. Many thanks.


P.S. I developed a similar algorithm for infinite nested radicals (see this post).

  • Interesting - but inviting us to admire and use your algorithm is not a question. – Ethan Bolker Feb 25 '25 at 23:30
  • Without examining your method closely, a reasonable hypothesis is that it leads to the same sequence of convergents as an equivalent simple continued fraction. Or, in other words, the convergence isn't really faster. You could compute a few convergents for a few examples, to check. – Chris Culter Feb 25 '25 at 23:49
  • A question, e.g. for $\pi$ is that try to find explicit expression of $a_n$ and $b_n^$ so that you've a interesting sequence describing $ \pi$ – EDX Feb 26 '25 at 00:36

0 Answers0