TITLE: Finding a prime number between $n$ and $2n$
QUESTION [7 upvotes]: I am trying to find a prime number between $n$ and $2n$.
I know that the number of primes between $n$ and $2n$ is $n/(2\ln n)$.
I was thinking of choosing a random number between $n$ and $2n$ and check if its prime. If no, repeat.
However, how do I find the repetitions needed to make sure I find a prime with a probability of .99?
Any help would be appreciated.

REPLY [2 votes]: Your conjecture is known as the Bertrand postulate:

For every $n > 1$ there is always at least one prime $p$ such that $n < p < 2n$.

Proving the conjecture isn't trivial, you can find a proof by Erdős on Wikipedia. He proved even stronger result that

... for any positive integer $k$, there is a natural number $N$ such that for all $n > N$, there are at least $k$ primes between $n$ and $2n$.