# Density of Rational Numbers in Lowest Terms in R

I have a question about the density of the rational numbers when they're strictly in lowest terms in $\mathbb{R}$.

I'm looking at all rational numbers in lowest terms, $\frac{p}{q} \in [0,1]$, and I've only considered those with denominators up to $n$ for some $n \in \mathbb{N}$. Pick an arbitrary irrational number and find the two rationals closest to it (one on the left and one on the right) out of the ones that I said I've considered so far.

I want it to be sandwiched between two rationals whose denominators are at least $n$. If they are already then that's great and I'm done. But if at least one of two rationals on either side has a denominator smaller than $n$ I want to keep adding rationals in lowest terms until it's between two of them with denominator at least $n$.

I'm curious if it's even possible to do this. I'm hoping there's some kind of density argument that can be used. For example, say that the left rational has a denominator lower than $n$. Then since the rationals are dense in $\mathbb{R}$, there has to be another rational number between the irrational and its left boundary and since I used up all rationals with denominators less than or equal to $n$ this one has to be greater than $n$.

Can I do this if all the rationals I'm considering are in lowest terms?

• It doesn't make sense to say a rational number is "in lowest terms." This is not a property of the number, it is a property of a particular representation as a quotient of two integers. – Matt Samuel Mar 28 '15 at 21:50
• If I alter my language to say that I'm considering all real numbers in [0,1] that can be represented as a quotient of integers in lowest terms, then is there a way to show that I can eventually sandwich any arbitrary irrational number between 2 whose representation has a denominator of at least n? – Confused Mar 28 '15 at 21:56
• @Confused yes, see the answers below. By the way, any rational number can be expressed as a fraction in lowest terms. – Matt Samuel Mar 28 '15 at 21:57

I don’t think you’ve clearly stated what you want to do, but I’ll speculate and try to answer.

You seem interested in the following: Given one irrational number $x$, consider all the rational numbers that can be written using denominators of $n$ or smaller.

One of these rational numbers, $a$, is closest to $x$ on the left, and another one, $b$, is closest to $x$ on the right, so $a< x < b$. Write $a$ and $b$ in lowest terms and see if the denominators are both exactly $n$.

Sometimes they are, and sometimes they aren’t. If they aren’t, I think you want to know if you can always consider somewhat larger denominators and then have it be the case that within this new set of more rationals, the ones closest to $x$ (left and right) both have denominator at least $n$.

Suppose for some $n$, you find $a$ and $b$ closest on each side of $x$, but unfortunately one or both of $a$ and $b$ can be written with denominators smaller than $n$ when you reduce to lowest terms.

Ok, so pick any pair of rational numbers closer in to $x$, again one on each side: $a <a'<x < b'< b$. (There are always ones to pick.)

You didn’t pick $a'$ or $b'$ before, so that means they weren’t in the first set of rationals you looked at. So they can’t be written with a denominator of $n$ or smaller, even in lowest terms, or you would have picked one of them instead of $a$ or $b$ the first time around.

That means you can increase the denominators you consider up to the larger of the denominators of $a'$ and $b'$. (You can’t really say “the denominators,” since there are infinitely many ways to pick a denominator for a given rational number, but write them any way you want — lowest terms isn’t needed.) Suppose the bigger denominator is $M$, and now include all the rationals with denominators up to $M$.

Now $a'$ and $b'$ might not be the closest ones to $x$ among this new set of rationals, so, again choose the closest left and right, so you’ll have $a < a'\le a''< x < b''\le b'< b$. The rational numbers $a''$ and $b''$ have to be the pair you were looking for. They are the closest (left and right) among all rationals with denominators up to a given point ($M$), but they must have denominators greater than $n$ in lowest terms, because you didn’t find them the first time around.

• Thank you this is exactly what I was aiming for. I apologize for the wording of my original question and really appreciate you writing out a detailed response like this. – Confused Mar 28 '15 at 22:45

Pick a prime $p\ge n$ such that $\frac1p<\min\{\alpha-\lfloor\alpha\rfloor,\lceil\alpha\rceil-\alpha\}$. If your irrational number is $\alpha$, there is a unique integer $n$ such that

$$\frac{n}p<\alpha<\frac{n+1}p\;,$$

and these fractions are in lowest terms, since neither $\frac{n}p$ nor $\frac{n+1}p$ is an integer.

• Thanks. I need a bit of time to absorb this but I was wondering if I could ask a follow-up. Using your method is it guaranteed that there are no numbers whose representations have a denominator less than n come between the irrational and n/p or the irrational and (n+1)/p? I need the closest number on the left and the closest number on the right to have denominator greater than or equal to n. Yes or no answer is sufficient, I just want to make sure we're on the same page when I try to digest this. – Confused Mar 28 '15 at 22:05
• @Confused: No, there’s no guarantee. Suppose that $\frac19<\alpha<\frac18$ and $n=8$. Then my suggestion will get you $\alpha$ between consecutive elevenths instead of between $\frac19$ and $\frac29$. – Brian M. Scott Mar 28 '15 at 22:09

if you take all the numbers of the form $$\frac{k}{p}$$ with $p$ prime these form $p$ subintervals of the same length of $[0,1]$ and your irrational must lie in one of them. Taking $p$ as big as you want, you can make the intervals as small as you want. Since $p$ is prime, the fractions are in lowest terms.

• @Matt: It’s still a problem: you don’t want your irrational to be in $[0,1/p]$ or $[1-1/p,1]$. – Brian M. Scott Mar 28 '15 at 22:06