Numbers whose decimal digits are the coefficients of its continued fraction form

A curious question recently crossed my mind: can we construct decimal numbers of the form $$\text{"a.bcdefghij…"}$$ where each letter represents a digit $0-9$ (where the number may or may not be rational), so that it is equal to a continued fraction of the form $$a+\cfrac{1}{b+\cfrac{1}{c+\cfrac{1}{d+\cfrac{1}{e+\ddots}}}}$$

For example, I found that

$$0.32062241134\dots=0+\cfrac{1}{3+\cfrac{1}{2+\cfrac{1}{0+\cfrac{1}{6+\cfrac{1}{2+\cfrac{1}{2+\cfrac{1}{4+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{3+\cfrac{1}{3+\cfrac{1}{5}}}}}}}}}}}}$$

Experimenting a bit, we see that we can certainly construct infinitely many numbers that are close solutions, but how can we make them the most efficient? To clarify, we prefer not to go too deeply nested into the continued fraction to make the previous digits work, because then we have to make those new digits work. So some questions are:

~What algorithm will construct such numbers?
~Does that algorithm construct numbers that are “efficient” as described above? Is there one number that is the "most efficient"?
~Does an exact non-repeating rational example exist?


Solution 1:

A "correct" continued fraction does not contain any zeroes after the first digit. For example, [8;6,7,5,3,0,9] is not a valid continued fraction; the number that computes to will actually have a continued fraction of [8;6,7,5,12]. (This is because 3+1/{0+1/9}=3+9=12). The numbers before and after the zero are added together. Similarly, the continued fraction of the number 0.32062241134... actually begins [0;3,8,2,2,4,1,1,3...]

So, you might be able to generate a sequence of [a;b,c,d,e,...] that gives you a+(b/10)+(c/100)+(d/1000)+(e/10000)+... , but you will not be able to successfully reverse it. You can calculate the decimal digits from the continued fraction, but not the other way around, unless there is a solution that contains no zeroes.