First of all, I don't know how ContinuedFraction[]
or Convergents[]
are implemeneted, and I think it is immaterial to my question.
for some number $x$ there's an associated continued fraction representation $[a_1,...,a_i,...]$ (finite or not), and, for this matter, two other sequences $[x_1,...,x_i,...]$ and $[d_1,...,d_i,...]$ defined like this:
As we follow the implementation of some $a_i$ into the fraction, further action is due on some number $x_{i+1}=n_{i+1}+d_{i+1}$. It consists of setting $a_{i+2}=n_{i+1}$, and repeating the action on $x_{i+2}=1/d_{i+1}=n_{i+2}+d_{i+2}$.
I am interested in an (possibly) efficient way of extracting the $[d_1,...,d_i,...]$ for some number $x$, preferably using functional programming in Mathematica. Any clue\lead would be very much appreciated!
I know I didn't give any base code to work with which is annoying, and I don't really expect anyone to come forth and solve someone else's problem from start to end. Having said that, hopefully, comments regarding this annoyance will be spared..
ContinuedFraction
doesn't answer your question. $\endgroup$ContinuedFraction
is a final result. It's process consists of rounding numbers (among other things), and performing actions on remainders, which are rounded again. Therefore, it hides all the numbers involved in the process. Some of these numbers, I think, are useful for understanding the relations between decimal representation (just as an example of an "ordinary" representation) and this representation. $\endgroup$