Conjecture: there are more than $\pi(p)$ primes between consecutive prime squares

150 Views Asked by At

For any $p_i$ (being the $i$th prime), it seems empirically certain that

$$\pi(p_{i+1}^2)-\pi(p_i^2)>i.$$

Equivalently: there are more than $\pi(p)$ primes between any $p^2$ and the next higher prime squared. I think that for large enough $p$, this would be strictly stronger than Legendre, Oppermann, etc., and someone yell at me if that's wrong.

I realize conjectures of this type currently remain famously unresolved; my question is whether this one in particular has been noted before, and if so, where/who by.

If I'm mistaken and someone spots a counterexample, that would also work as an answer.


Observations

I've now checked this for $i$ up to $~22000$, so all primes up to $250000$, meaning $p^2$ is hitting $~6.5\times 10^{10}$. Looking at the last few thousand intervals, we see:

  • Mean number of primes in an interval is $\approx 250000$.
  • Max number of primes seen in an interval was $1424502$.
  • Min number of primes seen in an interval was $36352$.

I find it notable that the minimums that far out are still $<2i$, meaning it's staying closer than I would have guessed. This also confirms that this conjecture is a much stronger claim than the others mentioned. In particular, Brocard's uses exactly these intervals, but it only asserts four or more primes in each of them.

From a few spot checks, the lower bound of the ratio $R_i:=\frac{\pi(p_{i+1}^2)-\pi(p_i^2)}{i}$ does seem to grow over time, albeit fairly slowly, giving the following min $R_i$ values for nearby samples of $i$:

$$ \begin{array}{|c|c|} \hline i & R_i \\ \hline 10^2 & 1.68 \\ \hline 10^3 & 1.738 \\ \hline 10^4 & 1.806 \\ \hline 10^5 & 1.842 \\ \hline \end{array} $$

I'd guess it grows unbounded, but checking anything much larger would require a cleverer approach to the number crunching.

Finally, I assume this behavior is not news to anyone, but the prime count in these intervals averages very closely to the value of $p$. For $1\leq i \leq 10000$, here are moving averages (50- and 2500-step) of each such ratio $\frac{\pi(p_{i+1}^2)-\pi(p_i^2)}{p_i}$ in that range.

lineplot of ratios


Edit: simplest broadly equivalent version

...is this, I think. For $n$ large enough,

$$\left(\frac{c+1}{4}\right)\pi(n) < \pi(n^2+n)-\pi(n^2) < \frac{1}{2}\pi(n),$$

where $0 \leq c < 1$ is a constant. $c=0$ requires no lower bound on $n$, but that lower bound increases as $c$ approaches $1$.

(IIRC, $c=2/3$ works for $n>5000$ or thereabouts, as a spot check.)

And if you prefer, I think this is equivalent. I couldn't decide which was better.

$$\left(\frac{c+1}{2}\right)\pi(n) < \pi((n+1)^2)-\pi(n^2) < \pi(n).$$