1

A factorial prime is of the form $n! \pm 1$. The first $14$ factorial primes are listed in the Online Integer Sequences (OEIS) A088054: $$ 2, 3, 5, 7, 23, 719, 5039, 39916801, 479001599, 87178291199, 10888869450418352160768000001, 265252859812191058636308479999999, 263130836933693530167218012159999999, 8683317618811886495518194401279999999 . $$ For example, $6! = 720$, and $719$ is prime.

My question is:

Q. Do number-theoretic heuristics suggest that there are only a finite number of factorial primes, or does "current technology" leave this question up in the air?

Joseph O'Rourke
  • 149,182
  • 34
  • 342
  • 933
  • 1
    Standard PNT heuristic gives that since $\sum\frac{1}{\log(n!+1)}$ diverges, there should be infinitely many such primes. What else are you asking for? – Wojowu Nov 23 '21 at 23:41
  • 4
    Also, there are many more known factorial primes than the ones you list. See the first few paragraphs here. Even the OEIS entry you link has a longer list. – Wojowu Nov 23 '21 at 23:42
  • 3
    Standard heuristics suggest infinite. Since $n! < n^n$, by using the PNT, we should expect that chance that $n! + 1$ is prime should be no more than about $$\frac{1}{\log (n^n)} = \frac{1}{n \log n}.$$ The series $$\sum_{n=2}^{\infty} \frac{1}{n \log n}$$ diverges, and so we should expect infinitely many such primes. Same argument goes through for $n!-1$. Note as discussed at https://mathoverflow.net/questions/401841/are-there-infinitely-many-n-such-that-n-1-and-n1-are-prime-numbers/401845#401845 one should expect only finitely many $n$ where both $n!+1$ and $n!-1$ are both prime. – JoshuaZ Nov 23 '21 at 23:46
  • 6
    Note that, since $n!$ never has small prime factors, it is "more likely" to be prime than a random number around its size. As such, their asymptotic number is closer to $\log x$ than the $\log\log x$ we would otherwise expect. This is worked out here – Wojowu Nov 23 '21 at 23:52
  • @Wojowu Oh, hmm, that's an interesting point. That makes the convergence of the paired version less obvious, so makes the heuristic I gave in that other answer less persuasive. – JoshuaZ Nov 23 '21 at 23:57
  • Thanks, @JoshuaZ and Wojowu, for those clarifying remarks and justifications. I would be happy to accept an answer along those lines. – Joseph O'Rourke Nov 23 '21 at 23:57

1 Answers1

5

So we see from the remarks and links the claim that one rough heuristic is that $n!+1$ is prime with probability around $\frac2n.$ If so, one might reason that the $k$th such prime is $n!+1$ for $n\approx e^{k/2}.$ So that prime (by crude reasoning) might be of order $n!+1 \approx e^{k/2e^{k/2}}.$ Furthermore, the same reasoning applies as well (or badly) to primes of the form $n!-1.$

In the graph below, the green dots are at the points $(k,k/2).$ The red dots are $k,ln(n_{k})$ where $n_{k}$ is the kth positive integer such that $n!+1$ is prime. The cyan dots are for the first $20$ cases where $n!-1$ is prime.

enter image description here