Compute a FINITE continued fraction of the form
$$x-\cfrac{1}{x-\cfrac{1}{x-\cfrac{1}{x-\cfrac{1}{x-\cdots}}}}$$
I have found many examples on the net but all of them are either infinite or of a particular number of levels. Any help would be good.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityCompute a FINITE continued fraction of the form
$$x-\cfrac{1}{x-\cfrac{1}{x-\cfrac{1}{x-\cfrac{1}{x-\cdots}}}}$$
I have found many examples on the net but all of them are either infinite or of a particular number of levels. Any help would be good.
Define $(A_n(x))_{n\geq 0}$ by
$$ A_n(x) = x, \qquad A_{n+1} = x - \frac{1}{A_n(x)}. $$
Then it is easy to check that we can write
$$ A_n(x) = \frac{G_{n+1}(x)}{G_n(x)},$$
where
$$ G_0(x) = 1, \qquad G_{1}(x) = x, \qquad G_{n+2}(x) = x G_{n+1}(x) - G_n(x). $$
Now note that $F_n(x) = i^{-n} G_n(i x)$ satisfies
$$ F_0(x) = 1, \qquad F_1(x) = x, \qquad F_{n+2}(x) = x F_{n+1}(x) + F_n(x),$$
which is the (shifted) Fibonacci polynomials. This allows us to find the exact formula for the coefficients of $G_n(x)$ in terms of the binomial coefficients.