A factorial prime is a prime number that is one less or one more than a factorial (all factorials above 1 are even). The first few factorial primes are:
n! − 1 is prime for (sequence A002982 in OEIS):
n! + 1 is prime for (sequence A002981 in OEIS):
No other factorial primes are known as of 2008.
Absence of primes to both sides of a factorial n! implies a relatively lengthy run of consecutive composite numbers, since n! ± k is divisible by k for 2 ≤ k ≤ n. For example, the next prime following 6227020777 = 13! − 23 is 6227020867 = 13! + 67 (a run of 89 consecutive composites); here the run is substantially longer than implied merely by the absence of factorial primes. Note that this is not the most efficient way to find large prime gaps. E.g., there are 95 consecutive composites between the primes 360653 and 360749.
