# Gaps between primes and prime counting function

With two consecutive primes $p_n$ and $p_{n+1}$ how many solutions does the inequality $$\frac {p_{n+1}-p_n}{2}\ge\pi(p_n)$$ have with $\pi(n)$ being the prime counting function

By Bertrand's postulate (which has been proven, so it's actually more a theorem than a postulate) there is a prime between $n$ and $2n$, so the left hand side of your inequality is less than $\frac{p_n}{2}$, so what your asking comes down to whether more than half the numbers less than $p_n$ are prime. It shouldn't take you long to find all solutions to that question.