Wednesday, December 13, 2017

number theory - How to restrict the output values of a continued fraction?



I understand that a continued fraction of the form: $g(n_1,n_2,n_3,n_4,n_5,\ldots)= n_1 + \cfrac{1}{n_2 + \cfrac{1}{n_3 + \cfrac{1}{n_4 + \cfrac{1}{n_5+\cdots} } } }$



gives a unique irrational number for every sequence of natural numbers $(n_1, n_2,n_3,n_4,n_5,...)$. I wish to however, restrict the output values of this continued fraction to say, an interval $(a,b) \in \mathbb R$. Is it possible to do so by somehow tweaking the fraction?


Answer



Yes. First of all, you need $\lfloor a\rfloor\le n_1\le \lfloor b\rfloor$.
Then if $\lfloor a\rfloor< n_1< \lfloor b\rfloor$, no more restrictions apply.
If $\lfloor a\rfloor= n_1< \lfloor b\rfloor$, recursively restrict $g(n_1,n_3,\ldots)$ to $(1,\frac1{a-n_1})$, if $\lfloor a\rfloor< n_1= \lfloor b\rfloor$ to $(\frac1{b-n_1},\infty)$ and if $\lfloor a\rfloor= n_1= \lfloor b\rfloor$ to $(\frac1{b-n_1},\frac1{a-n_1})$.




In principle, you have to watch out for the boundary points and I didn't describe how, but that does not matter not for "practical" purposes, especially, if $a,b$ are rational and you want to produce irrationals.


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection $f \colon A \rightarrow B$ and I want to get bijection. Can I just resting codomain to $f(A)$? I know that every function i...