I am trying to wrap my brain around a proof that proves that there are arbitrarily large gaps between successive primes. The proof is
Given a natural number $N\ge2$, consider the sequence of $N$ consecutive numbers $(N+1)!+2$, $(N+1)!+3$, $\dots$, $(N+1)!+ N + 1$. Note that $2$ divides $(N+1)!$ since $2$ is one of the factors in the product that defines $(N+1)!$. So $2$ divides $(N+1)!+2$ hence $(N+1)!+2$ is composite. Similarly, 3 divides $(N+1)!+3$ and so $(N+1)!+3$ is composite as well. Analogously, all the $N$ consecutive numbers from $(N+1)!+2$ to $(N+1)! + N + 1$ are composite. Since the number $N$ is arbitrary, there are strings of consecutive composite numbers of any given length. Hence there are arbitrarily large gaps between successive primes.
What I don't understand is where the function $(N+1)! + N+1$ comes from. How does this relate to the gaps in prime numbers?
Best Answer
I think your confusion would be cleared up by looking at an actual, concrete example.
Let's say you want a gap of at least ten composite numbers between two primes. If you don't care about finding the very first such gap, you can find a gap with that property by computing $(N + 1)!$. Since in this example we're setting $N = 10$, this gives us $11! = 2 \times 3 \times 4 \times \ldots \times 11 = 39916800$. Verify that:
Notice how the primes between the $+$ and $=$ signs are repeated to the right of the $=$ sign.
Actually, $11! + 12$ is also composite, but we already have our ten consecutive composite numbers.
Now, if you've memorized the first 25 primes or so, you should be able to instantly think of a run of ten consecutive composite numbers without needing to compute anything.
But what if instead I ask you for a run of a hundred consecutive composite numbers? You could laboriously search for the first such run. Or you could just go to $101! + 2$ and have it guaranteed that's composite as well as all the numbers up to $101! + 102$.