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'm tryng to understand the proof given in Hardys book A Theory of Numbers from the chapter on continued fractions. It states that

If $$\left|\frac{p}{q}-x\right| < \frac{1}{2q^2}$$ then $\frac{p}{q}$ is a convegent to $x$.


I the above inequality holds then $$\frac{p}{q} - x = \frac{\epsilon \alpha}{q^2},$$

$\epsilon = \pm 1$ and $ 0 < \alpha < \frac{1}{2}.$ This part makes sense but then he says

We write $\frac{p}{q}$ as a finite continued fraction say $[a_0,a_1,...,a_n];$ and by Theorem 158 we can choose n even or odd, we may assume that $\epsilon = (-1)^{n-1}.$ x can be written as

$$x = \frac{\omega p_n + p_{n-1}}{\omega q_n + q_{n-1}}$$

This equality is what I dont understand. Where does $\omega$ come from?

The book says that $\omega = \frac{1}{\alpha} - \frac{q_{n-1}}{q_n}.$

but I've tried staring at it for the last hour and I dont get where it comes from.

share|cite|improve this question

Consider $\omega$ as an unknown for a moment. Solve $x = \frac{\omega p_n + p_{n-1}}{\omega q_n + q_{n-1}}$ for $\omega$: $$ \omega = \frac{q_{n-1}x - p_{n-1}}{-q_nx+p_n} $$ Now insert $$ x = \frac{p}{q} - \frac{\epsilon\alpha}{q^2} $$ and note $p=p_n, q=q_n$ as well as $q_{n-1}p_n-p_{n-1}q_n = \epsilon$. This gives immediately the stated value for $\omega$.

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.