Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

Let $A$ be the subset of the rationals whose denominators are prime. Can we use the fact that the rationals are dense in the reals to show $A = \mathbb{R}$? I've read that using the fact that there are infinitely many primes is useful for this but I don't see the connection.

share|cite|improve this question
But $A$ does not equal $\bf R$. Perhaps you mean the closure of $A$ is $\bf R$. – Gerry Myerson Nov 17 '12 at 4:28

If there were only finitely many primes, then there would be only finitely many members of the specified set in every bounded interval, so it would have no accumulation points.

Suppose $x\in\mathbb R$. I claim $x$ is an accumulation point. To prove this, suppose $\varepsilon>0$. Find a prime $p$ so big that $1/p<\varepsilon/2$ (This is the part that we wouldn't be able to do if there were only finitely many primes). Then one member of the set $\{k/p : k\in\mathbb Z\}$ is in the neighborhood of radius $\varepsilon/2$ about $x$. If that one has $k$ a multiple of $p$, then look at its two neighbors, $(k\pm1)/p$. One of them is within $\varepsilon$ of $x$.

If instead of the set of primes we had used some set containing some composite numbers, then the proof would be more involved, since the cases where $k$ is a multiple of the denominator would not be the only cases in which the fraction $k/p$ is not in lowest terms.

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.