Proof that there is a finite number of rationals within a given range of an irrational number? When studying the continuity of the Riemann function, the whole proof lies on the basis that are are finitely many rationals within a given range of an irrational.
Such as part of the proof below:
Once you're given an irrational $x$ and an $\epsilon>0$, there is an integer $n>1/\epsilon$, and there are only finitely many rational numbers in, say, $(x-1,x+1)$ having denominator smaller than $n$ is lowest terms.  Thus there is a closest one to $x$, and you can use this to find your $\delta$.
Is there an intuitive way to explain or prove this basis?
 A: Perhaps it would be easier to prove (and imagine) a slightly more general statement:

For any $M>0$ and any $n\in\mathbb N$, there are only finitely many rational numbers $x\in(-M, M)$ such that $x=\frac{a}{b}$ where $a\in\mathbb Z, b\in\mathbb N$ and $b<n$.

This statement, intuitively, should be clear, because you can literally list all possible values of $x$. For example, take $M=2$ and $n=3$.
Then, the only options are $-2, -1, 0, 1, 2, -\frac52,-\frac42,-\frac32,-\frac22,-\frac12,0,\frac12,\frac22,\frac32,\frac42,\frac52$ (they are written with some duplication to make it clear how I found them all).
In general, you can list all values of $x$ by going through all possible values of $b$, and since there are finitely many options for any value $b$, and finitely many possible values of $b$, the total number is also finite.
In general, the values of $x$ are:

*

*For $b=1$, the options are $x=0, 1, 2, \dots, \lfloor M\rfloor - 1, \lfloor M \rfloor$, and the negative copies of those values.

*For $b=2$, the options are $x=0, \frac12,\frac22,\frac32,\dots,\dots \frac{\lfloor 2M \rfloor}{2}$, and the negative copies of those values.

*For $b=3$, the options are $x=0, \frac13,\frac23,\frac33,\frac43,\frac53,\dots,\frac{\lfloor 3M\rfloor}{3}$.

and so on.
