Metamath Proof Explorer


Table of Contents - 6.2.16. Prime gaps

According to Wikipedia "Prime gap", https://en.wikipedia.org/wiki/Prime_gap (16-Aug-2020): "A prime gap is the difference between two successive prime numbers. The n-th prime gap, denoted gn or g(pn) is the difference between the (n+1)-th and the n-th prime numbers, i.e. gn = pn+1 - pn . We have g1 = 1, g2 = g3 = 2, and g4 = 4."

It can be proven that there are arbitrary large gaps, usually by showing that "in the sequence n!+2, n!+3, ..., n!+n the first term is divisible by 2, the second term is divisible by 3, and so on. Thus, this is a sequence of n-1 consecutive composite integers, and it must belong to a gap between primes having length at least n.", see prmgap.

Instead of using the factorial of n (see df-fac), any function can be chosen for which f(n) is not relatively prime to the integers 2, 3, ..., n. For example, the least common multiple of the integers 2, 3, ..., n, see prmgaplcm, or the primorial n# (the product of all prime numbers less than or equal to n), see prmgapprmo, are such functions, which provide smaller values than the factorial function (see lcmflefac and prmolefac resp. prmolelcmf): "For instance, the first prime gap of size larger than 14 occurs between the primes 523 and 541, while 15! is the vastly larger number 1307674368000." But the least common multiple of the integers 2, 3, ..., 15 is 360360, and 15# is 30030 (p3248 = 30029 and P3249 = 30047, so g3248 = 18).

  1. prmgaplem1
  2. prmgaplem2
  3. prmgaplcmlem1
  4. prmgaplcmlem2
  5. prmgaplem3
  6. prmgaplem4
  7. prmgaplem5
  8. prmgaplem6
  9. prmgaplem7
  10. prmgaplem8
  11. prmgap
  12. prmgaplcm
  13. prmgapprmolem
  14. prmgapprmo