Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
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.

share|cite|improve this answer
Thank you for the advice. A comment made me notice I had transcribed the problem wrong. Am I right in thinking your advice works for the edited problem too? – Alex Oct 28 '13 at 2:52
Check divisibility by $p_1, p_2,\ldots, p_n$ and see! – vadim123 Oct 28 '13 at 3:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.