# Is there a prime number between every prime and its square?

For each prime number $p$, is there always an other prime number between $p$ and $p^2$ ?

I tested it for prime numbers $< 500,000,000$, but I wanted to know if there is any mathematical proof of this ?

-

## migrated from stackoverflow.comMay 9 '11 at 22:29

This question came from our site for professional and enthusiast programmers.

Shouldn't it be migrated to Math instead of closed? :/ – Oscar Mederos May 9 '11 at 22:00
I think closing, instead of migrating, is not the best move... – Brian Stinar May 9 '11 at 22:05
Can anyone give a direct combinatorial proof of this? – quanta May 9 '11 at 23:03
Would $\pi(x) \ge \log x / \log 2$ be enough? – quanta May 9 '11 at 23:33

Yes. By Bertrand's postulate (actually a theorem), for every natural number $n$ (and thus every prime) there is a prime between $n$ and $2n$. As $p^2 \gt 2p$ for all primes $p$ greater than $2$, there is another prime in this interval, and when $p=2$, $3$ comes between $p$ and $p^2$.
A much harder, indeed, still wide open question is whether for every $n$ there's a prime between $n^2$ and $(n+1)^2$. – Gerry Myerson May 9 '11 at 23:48
@Tobias There's approximation of number of primes less than given x: en.wikipedia.org/wiki/Prime_counting_function – Victor Sorokin May 13 '11 at 14:55