An infinite simple continued fraction

$$\frac{1}{b_1 + \frac{1}{b_2 + \frac{1}{b_3+\dots}}} (b_i\in\mathbb Z\setminus\left\{0\right\})$$

is irrational. Now for a generalized continued fraction:

$$\frac{a_1}{b_1 + \frac{a_2}{b_2 + \frac{a_3}{b_3+\dots}}} (a_i\in\mathbb Z\setminus\left\{0\right\}, b_i\in\mathbb Z),$$

the same conclusion is apparently not valid. Legendre gave a sufficient condition for irrationality:


for any $i$ large enough.

Can this result be strengthened in any way? Especially, might it hold for $a_i, b_i\in\mathbb Q$?

Also, can anyone give an example of an infinite generalized continued fraction that converges to a rational, showing that some condition on the $a_i, b_i$ is needed for irrationality?

  • 2
    $\begingroup$ For the simple continued fraction, the $b_i$ should be positive integers. $\endgroup$ Feb 23, 2017 at 11:15
  • $\begingroup$ Perhaps this is interesting: some heuristical examples and systematized at go.helms-net.de/math/divers/GenContFracRationalE.htm $\endgroup$ Feb 25, 2017 at 12:49
  • $\begingroup$ A better reference is likely David Angell - A family of continued fractions (2010) Journal of Number Theory 130 , pg. 904-911 (Elsevier). $\endgroup$ Feb 25, 2017 at 14:17
  • 1
    $\begingroup$ Do you have a source for Legendre's condition applying when $a_i$ or $b_i$ are negative integers? $\endgroup$
    – Pazzaz
    Dec 25, 2019 at 12:19
  • $\begingroup$ It should be worth noting that any continued fraction is quadratic irrational iff it's periodic, see: Wolfram MathWorld $\endgroup$
    – Vessel
    Mar 28 at 19:11

3 Answers 3


There are such examples in Ramanujan's Notebooks, Part 2, page 116enter image description here


There is a family of generalized continued fractions which give irrational or rational values depending on a very simple but nontrivial parametrization. I'd like to use the notation $$c = a_0 + {b_0\over a_1 + {b_1\over a_2 + ... }} = a + {b\over (a+1) + {(b+1)\over (a+2) + {(b+2)\over (a+3) + ... }... }}$$ in accordance with the Angell-article (see below).

The following family of generalized continued fraction gives rational or irrational numbers depending on parametrization: $$\begin{array} {r|r} \begin{matrix}&a_k=\\b_k=&\end{matrix} &&0+k & 1+k & 2+k & 3+k & \cdots \\ \hline 0+k && 0 & 1 & 2 &3 & \cdots \\ \hline 1+k && {1\over e-1} & {1\over e-2} & {1\over 2e-5} & {1\over 6e-16} & \cdots \\ \hline 2+k && {1\over 1} & -{1e-1\over 0e-1} & -{1e-2\over 1e-3}& -{2e-5\over 4e-11} & \cdots \\ \hline 3+k && {4\over 3} & {2 \over 1} & -{0e-2\over 1e-2}& -{2e-6\over 3e-8} & \cdots \\ \hline 4+k && {21\over 13} & {9 \over 4} & {3 \over 1} & -{3e-6\over 2e-6} & \cdots \\ \hline \cdots & & \cdots \end{array}$$

I've found that heuristically, using wolframalpha for support in the evaluation.

David Angell describes that family and gives that heuristic the analytic background (at least for the rational results if I got this correctly) see: David Angell - A family of continued fractions (2010) Journal of Number Theory 130 , pg. 904-911 (Elsevier), online: "paywall"

A somewhat larger table is at my mathpages - GenContFrac


Apparently no such extension is known. But there are other irrationality criteria for sequences of the form

$$\frac{\sum_{i=1}^n a_i}{\sum_{i=1}^n b_i},$$

such as those by Brun and by Froda.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.