# How to prove this inequality using prime number theorem

Define $s_n=p_{n+1}-p_n$, where $p_n$ is the $n$th prime number, now how to show that $$\lim_{n \rightarrow \infty} \inf \frac{s_n}{\log n} \leq 1$$ I used the result from the prime number theorem: $p_n \sim n \log n$, but have a difficult time dealing with the $\inf$ part.

-
I don't understand the question. I would normally be inclined to take $\inf (s_n/\log n)$ to mean $\inf\{s_n/\log n : n=1,2,3,\ldots\}$. That inf is not a number that depends on some number called $n$. And so I wouldn't take the limit of it as $n\to\infty$. Could it be that what is meant is liminf? – Michael Hardy Oct 1 '11 at 17:32
Yes, it's clear that the OP means $\liminf$. – user02138 Oct 7 '11 at 6:38

Here we go: $p_n \sim n\log n$, and $p_{2n}\sim 2n\log(2n)\sim 2n\log n$. So $$p_{2n}-p_n=(p_{2n}-p_{2n-1})+(p_{2n-1}-p_{2n-2})+\cdots +(p_{n+2}-p_{n+1})+(p_{n+1}-p_{n})\sim n\log n.$$ As there are $n$ terms and the average is $\log n$, one needs to be smaller then $\log n$, which means lim inf is smaller.
To deal with the infimum, remember that $p_n \sim n \log n + o(n \log n)$, see this page for more accurate expansion.
The sequence $(p_{n+1}-p_{n})/\log n$ has lots of spikes. The infimum of this sequence would be the lower envelope for it. For sufficiently large $n$ $$\begin{eqnarray} \inf \frac{p_{n+1} -p_n}{\log n} &<& \frac{(n+1) \log(n+1) - n \log n}{\log n}= \frac{(n+1) \left(\log n + \log(1+\frac{1}{n})\right) - n \log n}{\log n}\\ &=& 1 + \frac{n+1}{\log n} \log\left( 1 + \frac{1}{n} \right) < 1 + \frac{n+1}{\log n} \frac{1}{n} = 1 + o(1) \end{eqnarray}$$