I've heard of continued fractions, like


usually written like:


(in my opinion, it's pure genius!) I've heard of some simple ones like:

$$\sqrt 2=\frac{1}{1+}\frac{1}{1+}\frac{1}{1+}\frac{1}{1+}\frac{1}{1+}\frac{1}{1+}\frac{1}{1+...}$$

my question is, is there any way to make rational numbers like $\frac{x}{y}$ into continued fractions that terminate?

  • 1
    $\begingroup$ en.wikipedia.org/wiki/… $\endgroup$ – Will Jagy Apr 12 '17 at 16:04
  • $\begingroup$ Possible duplicate of How to find continued fraction of pi $\endgroup$ – MJD Apr 12 '17 at 16:30
  • $\begingroup$ Note that the top-scoring answer there directly addresses your question about continued fractions for rational numbers. It begins “Here is how you find the continued fraction for any number at all” and ends “Repeat as desired, or stop if $x_i$ becomes 0, which will happen if and only if the original $x_0$ was rational”. $\endgroup$ – MJD Apr 12 '17 at 16:31

Yes, all rational numbers have terminating continued fractions even when you require that all the numerators be $1$. Wikipedia shows how to compute it and that there are exactly two representations. It should be clear that any finite continued fraction is rational-just unpack it and use the closure of the rationals under addition and multiplication.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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