# Prove that every number between two factors of primes is composite.

I am looking for some help with this problem:

Let $p_1,p_2,\dots,p_{n+1}$ be the first $n+1$ primes in order. Prove that every number between $p_1p_2p_3\dots p_n+1$ and $p_1p_2p_3\dots p_n + p_{n+1}-1$ is composite (inclusive of the second term). How does this show that there are gaps of arbitrary length in the sequence of primes?

I know that if $p_1p_2p_3\dots p_n+1$ is not prime, it must have a prime factor larger than $p_n$, and I am guessing this can be leveraged to prove the above problem, but I am not sure where to start or how to put this in mathematical terms. Any help/hints would be great.

-
How do you know that $p_1p_2p_3\dots p_n+1$ is not prime? For example, $2\cdot3+1=7$ is prime. So is $2\cdot3\cdot5+1=31$. So is $2\cdot3\cdot5\cdot7+1=211$. So is $2\cdot3\cdot5\cdot7\cdot11+1=2311$. – Ivan Neretin Oct 12 '15 at 13:10

The usual way that the final result is proved is by considering the interval $[n!+2, n!+n]$, the terms of which are divisible by $2,3,\ldots, n$, respectively and therefore composite.
Check divisibility by $p_1, p_2,\ldots, p_n$ and see! – vadim123 Oct 28 '13 at 3:03