# Show there exist gaps between primes which are arbitrarily large [closed]

Show that given any natural number $n$, there are two prime numbers $p$ and $q$ such that $q > p$ and $q - p \geqslant n$ , and all natural numbers strictly between $p$ and $q$ are composite (nonprime) numbers.

## closed as off-topic by Martin R, zhoraster, N. F. Taussig, 6005, jameselmoreOct 13 '15 at 15:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Martin R, 6005, jameselmore
If this question can be reworded to fit the rules in the help center, please edit the question.

• You can use the fact that for $n\geq 2$, the numbers $n!+k$, $2\leq k\leq n$ are all composite, take $n\geq l+1$, and $p$ the largest prime number $\leq n!+1$. – Kelenner Oct 12 '15 at 9:36
• @RaziehNoori Only one input number $n$ is in the premise. Your comment does not make much sense. – skyking Oct 12 '15 at 9:59
• – Martin Sleziak Oct 12 '15 at 15:16
• @RaziehNoori As far as I can see the edits have only been of cosmetical nature, ie the question before the edit was the same. Then only one input number $l$ was in the premise. – skyking Oct 13 '15 at 5:25

Take for example $P = n!+1$ and $Q = n! + n+1$, now $Q-P = n$ so $Q>P$.

Now for a number $k$ between $P$ and $Q$ (ie $Q>k>P$) we have $n+1 > k-n! > 1$ so $k = n! + l$ where $n+1 > l > 1$. Now

$$n! = 2\cdot3\cdot...\cdot n$$

Now you can see that since $l\le n$ and $l\ge2$ that $l$ is a factor in the factorial, that is $l|n!$ (ie $n!/l$ is an integer). So

$$k = n! + l = l(n!/l) + l = l(1+n!/l)$$

Finally if $P$ and $Q$ is not primes we could select the largest prime $p\le P$ (exists since $P=n!+1\ge2$) and the smallest prime $q \ge Q$ (exists becaus there exists arbitrarily large primes). Now if k is between $p$ and $q$ it's either between $P$ and $Q$ and it follows that $k$ is composite, or $p < k \le P$ and it's composite because $p$ is the largest prime $\le P$, or $Q \le k < q$ and it's composite because $q$ is the smallest prime $\ge Q$.

• Instead of letting $p=n!+1$, you should let $p$ be the largest prime $\leq n!+1$. Similar comments for $q$. – Element118 Oct 12 '15 at 10:48
• @Element118 Yes, but that is not required to prove the statement. One would perhaps need to motivate why there must exist a prime $\le n!+1$ (trivially since $n! \ge 1$). – skyking Oct 12 '15 at 11:19
• It is mentioned in the question that p and q are primes, so you need to be a bit more rigorous in writing your proof. – Element118 Oct 12 '15 at 11:21
• @Element118 I didn't see that requirement, I've updated the proof to handle that requirement. – skyking Oct 12 '15 at 11:58