With simple continued fraction, i.e. $$a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 \ldots}}}$$ I can use this formula: $$a_k = \lfloor \alpha_k \rfloor$$ $$\alpha_{k+1} = \dfrac{1}{\alpha_k - a_k}$$
I wonder is there a formula to express the "generalized continued fraction" of the form: $$a_0 + \cfrac{b_0}{a_1 + \cfrac{b_1}{a_2 + \cfrac{b_2}{a_3 \ldots}}}$$ ?
Thank you,
You want $\alpha_k = a_k + \frac{b_k}{\alpha_{k+1}}$ so $\alpha_{k+1} = \frac{b_k}{\alpha_k - a_k}$.