What is wrong with my proof on elementary prime gaps? Question
I want to prove that the rationals of the form $\displaystyle \frac{p}{q}$ where $p,q$ are primes are dense in $[0,\infty)$.
The usual way to do this using the original form of PNT $\displaystyle \pi(x)\sim \frac{x}{\log x}$, then deducing that for $x>x_0(\epsilon)$, there exist a prime between $[x,(1+\epsilon)x]$. After that, it is easy to obtain the result. I wanted to do a different thing and used the prime number theorem of the form $p_n \sim n\log n$ (as they are equivalent) to obtain the auxiliary result.
My Attempt
PNT of the form $p_n \sim n\log n$ implies that $\displaystyle p_{n+1}-p_n = o(p_n)$ immediately. Let $\epsilon > 0$, then $n>N(\epsilon)$ implies that $\displaystyle\frac{p_{n+1}-p_n}{p_n} < \epsilon$. Set $x_0(\epsilon) > p_n$ where $n>N(\epsilon)$. Suppose $x>x_0$. Let $\overline{x}$ denotes the smallest prime that is greater than $x$. Similarly $\underline{x}$ denotes the largest prime that is lesser than $x$. Then $[\underline{x},\overline{x}]$ will have length lesser than the interval $[x,(1+\epsilon)x]$ which follows from the fact that $\displaystyle \frac{\overline{x}-\underline{x}}{\underline{x}} < \epsilon\leq \frac{\epsilon x}{\underline{x}}$. Now, since $x\geq \underline{x}$, $\overline{x}\in[x,(1+\epsilon)x]$.
Now let $f(n)$ be a polynomial in natural numbers. Then the above proof would also can be applied to the statement, for every $x>x_0(\epsilon)$ $[x,(1+\epsilon)x]$ contains an element from the sequence $\{f(i)\}_{i=1}^{\infty}$. It can also be generalized to a large class of integer valued functions such that $$f(n) = n^{r_1}\log^{r_2}(n)\log^{r_3}\log(n)\ldots \log^{r_k}_{k}(n)+o(n^{r_1}\log^{r_2}(n)\log^{r_3}\log(n)\ldots \log^{r_k}_{k}(n))$$ for real numbers $r_1,r_2,\ldots,r_k >1$ and $\log_k$ is the iterated logarithm.
But I think this is a bit too powerful so I believe that I made some mistake.
 A: The only qualm I have in your proof is that you say "set $x_0(\varepsilon)>p_n$" for $n>N(\varepsilon)$. Now this is possible, but if the $>$ were replaced by a $<$, it would introduce a dependency of $x_0(\varepsilon)$ on $N(\varepsilon)$, which could destruct the proof.
In my opinion, a better way to write this is then to let $y_0(\varepsilon) = \max(1+p_{1+N(\varepsilon)}, 1+x_0(\varepsilon))$ and work with $\overline{y}$ and $\underline{y}$ defined similarly.
However, your proof is in fact correct and it does indeed generalize! I'll just show this with the example of $f(n)= n^r$ for any $r\in\mathbb{R_+}$, as this is as sparse as your $f$ can get. Now to show that there is a $r$-power between $[x,x(1+\varepsilon)]$, we can simply show that for any $\varepsilon>0$, $f(n+1)/f(n)\leq 1+\varepsilon$. This is because $x^r$ is continuous so we can write
$$\left(\frac{n+1}{n}\right)^r = \left(1+\frac{1}{n}\right)^r\to 1 \text{ as } n\to\infty$$
The proof with the logarithms is similar, but less clean, so I won't write it here, but feel free to work it out yourself.
