nonmonotonic gaps

Let $p_i$ be the $i$th prime and define $g(n) = p_{i+1} - p_i$ to be the gaps between the primes. As usual $\pi(n)$ counts the number of primes below $n$.

Since the primes get sparser as you go outwards we know that $g(n)$ increases on average. Whenever $g(n)=2$ you have a pair of twin primes.

Question: Does $g(n)$ eventually become monotonic? The answer is no, it must always rise and fall forever. The proof strategy is thanks to quid from mathoverflow!


First of all note: If $g(n)$ is small for a while then $\pi(n)$ will increase fast, if $g(n)$ is large then the primes are spaced out far so $\pi(n)$ will grow slowly.

So here is the proof strategy: Find some asymptotic bound for the slowest growing possible monotonic gap function $g(x)$, that then translates into an upper bound estimate for $\pi(x)$ (there must be fewer primes than our estimate for $\pi(x)$). Then we can compare it against the chebychev bound $x/\log(x)$ to get a contradiction showing that it must be non-monotonic.


arithmetic progressions of primes

The slowest $g(n)$ possible would be one that tries to stay constant as long as possible, it cant be constant forever. When it's forced to increase by arithmetical considerations it would increase by 2 (gaps after 2,3 have to be even).

So we focus on bounding sequences of primes with constant gap $d$. We will show that there cannot be $d+2$ of them in a row.

Suppose $p,p+d,p+2d,\ldots,p+(d+1)d$ was a sequence of $d+2$ primes, then since $d+1$ is coprime to $d$ it covers every congruence class mod $d+1$ (the last one twice). Thus we have $d+1 | p+kd$ with $k\ge 1$ so this number is composite unless $1 = p+(k-1)d$, which is impossible.


asymptotics

Now we have seen that the slowest possible $g(n)$ would take on the gap $d$, $d+2$ times then $d+2$, $d+4$ times and so on. Summing up $N$ of these gaps gives us $D$ where $\pi(D) = N$.


therefore we have the lower bound $\pi(x) = O(x^{3/2})$ but we know from Chebyshev that $\pi(x) \sim x/\log(x) > O(x/x^{1/3})$.


Futher

this is a really interesting fact and what a nice elementary proof. The same theorem comes as a consequence of a much stronger theorem by Zhang that there is a finite gap size that occurs infinitely often (in fact that gap is known to be <300). Apparently it's not too difficult to understand his proof, maybe I'll read it one day.


Next I may consider going over the proof that primes are distributed aperiodically across congruence classes.