Compute a finite periodic continued fraction

94 Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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.