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.
 A: 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. 
