# Proving any interval of a specified set is not dense

It is a question from "Problems in Calculus and Analysis" by A.A.Blank. The question has 2 parts:

(a)For any fixed integer $q>1$, prove that the set of points $x=p/q^s$, $p,s$ ranging over all positive integers, is dense on the number line. (b)Show that if $p$ is required to range only over a finite interval, $p \le M$ for some fixed $M$, the set of all $x$ is not dense on any interval.

My attempt for respective questions:

(a)Let $P$ be any point of the sets on the number line. Then $P+1/q^{2s}$ is a point $x$ closer to any given $P$ in any length of $1/q^s$ from $P$. In other words, we can find some point(s) given any length from the point $P$.

(b)$0$ is outside any interval because $0$ is not a positive integer. Even though any interval with $0$ is dense, those intervals need not be considered. For any arbitrary interval,$[\frac{k}{q^s},\frac{l}{q^p}]$, consider a fraction $\frac{m}{q^r}$. For the fraction to be in the interval, it must satisfy the inequality $kq^r<mq^s$. Since the left hand side must be smaller than the right hand side, there are only a limited options for the power $r$ even though it is allowed to ranged over all positive integers. On the right hand side, $m$ must be smaller than $M$, so there are limited options for $m$ too. Thus there can only be a finite number of points in any interval.

Above are my attempts on the question, which I believe is not convincing enough. Please help me, thanks.

• There is a little issue with a). If we insist that $p$ is positive, we only get denseness over the non-negative reals. Then (hint) suppose $a\ge 0$. Given $\epsilon\gt 0$, we want to show that there are $s$, $p$ such that $0\lt \left|\frac{p}{q^s}-a\right|\lt \epsilon$. Let $s$ be such that $\frac{1}{q^s}\lt \epsilon$. – André Nicolas Jul 18 '15 at 16:13
• But the question states that $p$ ranges over all positive integers only. Following your hint, do you mean that I should choose $p$ such that $p<q_s(\epsilon +a)$ to achieve the inequality you stated? – Dave Clifford Jul 19 '15 at 15:14
• As I pointed out, if we restrict $p$ to positive, the numbers are not dense in the line, we can get nowhere near $-17$. But the numbers are dense in $[0,\infty)$. We choose $s$ so that $1/q^s\lt \epsilon$, and consider $1/q^s, 2/q^s,3/q^s$, and so on. If $n$ is the largest integer such that $n/q^s\le a$, then choosing $p=n+1$ will do the job. If we allow $p$ to be negative, we do get dense in the line. The second problem is kind of interesting, I am surprised no one has written a solution. – André Nicolas Jul 19 '15 at 15:26
• @AndréNicolas This question appears in the first page of the book mentioned above, I have finished reading the first chapter of Courant's "Introduction to Calculus, Vol 1" but found myself has limited knowledge to tackle the very first question of the exercise book, which intends to be a companion the Courant's book. – Dave Clifford Jul 19 '15 at 15:43
• I unintentionally left out the negative portion of the number line while considering its density. Does the question has a mistake or the author define $0$ as a positive integer? – Dave Clifford Jul 19 '15 at 16:18

a) Since $p$ is restricted to positive values, the set $W$ of numbers of the shape $\frac{p}{q^s}$ cannot be dense on the full number line. We will show $W$ is dense on the interval $[0,\infty)$. One cannot do better.

Let $a\ge 0$. We will show that for any $\epsilon \gt 0$, there exists a $w\in W$ such that $0\lt |w-a|\lt \epsilon$.

Let $s$ be any positive integer such that $\frac{1}{q^s}\lt \epsilon$. Now consider the numbers of the shape $\frac{n}{q^s}$, where $n$ ranges over the non-negative integers.

Because of the Archimedean property of the reals, there are positive integers $n$ such that $\frac{n}{q^s}\gt a$. Let $p$ be the smallest such integer. Then $$\frac{p-1}{q^s}\le a \lt \frac{p}{q^s}.$$ Since the interval from $\frac{p-1}{q^s}$ to $\frac{p}{q^s}$ has length $\frac{1}{q^s}\lt \epsilon$, it follows that $0\lt \left|\frac{p}{q^s}-a\right\lt \epsilon$. This completes the proof.

b) Let $T$ be the set of all $\frac{p}{q^s}$ where $p$ is an integer with $0\lt p\le M$. Take any proper interval $I$ of real numbers. If $I$ contains a negative real, then $T$ cannot be dense on $I$. And if $I$ contains $0$, it has a subinterval that does not contain $0$. So without loss of generality we may assume that $I$ is an interval $(a,b)$ of positive reals. We will show that $T$ cannot be dense on $I$ by showing that $(a,b)$ contains only finitely many elements of $T$.

Suppose to the contrary that there are infinitely many elements of $T$ in the interval. Let $C=\frac{1}{b}$ and $D=\frac{1}{a}$. Then there are infinitely many numbers of the form $\frac{q^s}{p}$, with $1\le p\le M$, in the interval $(C,D)$.

This is impossible, since for any $p$ there are only finitely many rationals with denominator $p$ in the interval $(C,D)$. Indeed, the number of such rationals is $\le p D$, so the number of points of $T$ in the interval $(a,b)$ is $\le \frac{M(M+1)}{2a}$.

Remark: Your argument for b) has very much the right idea, and with some work can be turned into a proof. We took the shortcut of using the reciprocal in order to save time and typing. Your argument for a) is some distance from being precise enough.