Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd really love your help with finding the rational number which the continued fraction $[1;1,2,1,1,2,\ldots]$ represents.

With the recursion for continued fraction $( p_0=a_0, q_0=1, p_{-1}=1, q_{-1}=o), q_s=a_sq_{s-1}+q_{s-2},p_s=a_sp_{s-1}+p_{s-2}$. I found out the $p_k=1,2,5,7,12,32, q_k=1,1,3,4,7,18 $ (anything special about these series? perhaps I did a mistake?), and I know that $r=\lim_{c_k}=\lim\frac{p_k}{q_k}$, but I can't see anything special about $p_k, q_k$ or the realtion between them, Any help?

Thanks a lot!

share|cite|improve this question
Your problem might be that the continued fraction for a rational number terminates. The classical method for evaluating recurrent continued fractions is to set $x=[1;1,2,1,1,2, ...]$ and note that $x=[1;1,2,x]$ (if I have read your notation right) which gives a quadratic in x. – Mark Bennet Jun 28 '12 at 22:03
The number is a quadratic irrationality. – André Nicolas Jun 28 '12 at 22:08
Does the continued fraction continue indefinitely? does it repeat? A number is rational if and only if its continued fraction terminates. A number is the root of a quadratic equation with integer coefficients if and only if its continued fraction repeats. – robjohn Jun 28 '12 at 22:09
That $x$ in the brackets might also be $\frac 1 x$ depending on how the notation works. It still gives a quadratic. – Mark Bennet Jun 28 '12 at 22:11
The 32 in the question should be 31; it's $2\times12+7$. – Gerry Myerson Jun 28 '12 at 23:33
up vote 5 down vote accepted

We have that $$\Large x=1+\frac{1}{1+\frac{1}{2\,+\,\frac{1}{1\,+\,\frac{1}{1\,+\,\frac{1}{2\,+\,\cdots}}}}}=1+\frac{1}{1+\frac{1}{2+\frac{1}{x}}}$$ so that $$\frac{1}{x-1}=1+\frac{1}{2+\frac{1}{x}}$$ hence $$\frac{1}{\frac{1}{x-1}-1}=\frac{1}{\frac{1}{x-1}-\frac{x-1}{x-1}}=\frac{1}{\frac{2-x}{x-1}}=\frac{x-1}{2-x}=2+\frac{1}{x}$$ and thus $$x^2-x=2x(2-x)+(2-x)$$ $$x^2-x=-2x^2+4x+2-x$$ $$3x^2-4x-2=0$$ The roots of this equation are $$x=\frac{4\pm\sqrt{40}}{6}=\frac{4\pm 2\sqrt{10}}{6}$$ but we know it can't be $x=\frac{4-2\sqrt{10}}{6}$ since that number is negative, so we can conclude that $x=\frac{4+2\sqrt{10}}{6}$. Note that this number is not rational.

share|cite|improve this answer
If you use \cfrac, you can make the continued fraction look like this: $\displaystyle 1+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{2+ \cdots}}}}}$ rather than like this: $\displaystyle 1+\frac{1}{1+\frac{1}{2+\frac{1}{1+\frac{1}{1+\frac{1}{2+ \cdots}}}}}$ – Michael Hardy Jun 28 '12 at 22:14
Nice! Thanks a lot for the answer. – Jozef Jun 28 '12 at 22:15
@Michael: Ah, thanks for the LaTeX tip! – Zev Chonoles Jun 28 '12 at 22:15
just one thing,It is suppose to be $x=\frac{4+/-\sqrt{40}}{6}$ and so on :-) – Jozef Jun 29 '12 at 6:53
@Jozef: Haha, thanks for pointing that out! I'll fix it. That's what I get for typing faster than I was thinking :) – Zev Chonoles Jun 29 '12 at 6:57

It's not rational if its simple continued fraction expansion repeats rather than terminating.

If you mean this: $$ 1+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{2+ \cdots}}}}} $$ with $1,1,2$ repeating forever, then look at it like this: $$ x = 1+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{\left( 1+\cfrac{1}{1+\cfrac{1}{2+ \cdots}}\right)}}} = 1+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{x}}}. $$

You then have $$ x = 1+\cfrac{1}{1+\cfrac{1}{2+\cfrac{1}{x}}}. $$ Simplify the fraction and you've got a quadratic equation that you can solve for $x$.

share|cite|improve this answer
Thank you for the answer. – Jozef Jun 28 '12 at 22:14

Since this continued fraction is infinite,this can't be a rational number(it is surely an irrational number).For more details,

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.