TITLE: Irrationality of generalized continued fractions
QUESTION [5 upvotes]: An infinite simple continued fraction
$$\frac{1}{b_1 + \frac{1}{b_2 + \frac{1}{b_3+\dots}}} (b_i\in\mathbb Z)$$
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,b_i\in\mathbb Z),$$
the same conclusion is apparently not valid. Legendre gave a sufficient condition for irrationality:
$$|a_i|<|b_i|$$
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?

REPLY [4 votes]: 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