2
$\begingroup$

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,

$\endgroup$
4
  • $\begingroup$ Nothing that works in general. For the most part, one derives continued fraction representations for functions, and then replacing parameters with appropriate quantities yields the continued fraction for the value of the function... $\endgroup$ Aug 7, 2011 at 18:18
  • $\begingroup$ @J.M.: I see. Thank you. $\endgroup$
    – roxrook
    Aug 7, 2011 at 18:38
  • $\begingroup$ @Chan: In your generalized continued fraction are $a_{k}$ and $b_{k}$ positive integers? Are you asking for a formula for the $b_{k}$ similar to the formula the $a_{k}$? There isn't one: A real number can have many different generalized continued fraction representations. $\endgroup$
    – Peter Bala
    Aug 8, 2011 at 8:17
  • $\begingroup$ @Peter Bala: I guess there isn't a unique one. Thanks for the answer. $\endgroup$
    – roxrook
    Aug 9, 2011 at 7:18

3 Answers 3

2
$\begingroup$

You want $\alpha_k = a_k + \frac{b_k}{\alpha_{k+1}}$ so $\alpha_{k+1} = \frac{b_k}{\alpha_k - a_k}$.

$\endgroup$
2
$\begingroup$

The simplest way: take all $b_k=1$ and use your previous formula.

$\endgroup$
1
  • $\begingroup$ Thank you. But then, how would I generate $b_k$ again if initially I take them all to 1? $\endgroup$
    – roxrook
    Aug 7, 2011 at 18:39
2
$\begingroup$

@Chan, Here is an example for $\pi$:

$$ \pi=\textstyle \cfrac{4}{1+\textstyle \frac{1^2}{2+\textstyle \frac{3^2}{2+\textstyle \frac{5^2}{2+\textstyle \frac{7^2}{2+\textstyle \frac{9^2}{2+\ddots}}}}}} =3+\textstyle \frac{1^2}{6+\textstyle \frac{3^2}{6+\textstyle \frac{5^2}{6+\textstyle \frac{7^2}{6+\textstyle \frac{9^2}{6+\ddots}}}}} =\textstyle \cfrac{4}{1+\textstyle \frac{1^2}{3+\textstyle \frac{2^2}{5+\textstyle \frac{3^2}{7+\textstyle \frac{4^2}{9+\ddots}}}}} $$

Each continued fraction converges to $\pi$, but at greatly different rates.

The first is horrifically slow, requiring roughly $3\times 10^n$ terms for n decimal digits.

The second starts off nicely but later requires nearly 50 terms for five decimal digits, 120 for six.

The third is the best, requiring just four terms for each three decimal digits.

$\endgroup$
2
  • $\begingroup$ OP was asking for a way to get expansions like the ones you cite, not examples. $\endgroup$
    – vonbrand
    Mar 5, 2013 at 18:33
  • 2
    $\begingroup$ @vonbrand I think this is a nice way of showing that such expansions can't possibly be unique in the way the OP was hoping. $\endgroup$ Mar 5, 2013 at 18:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .