Skip to main content
4 of 4
answered the modified question
Andrey Rekalo
  • 22.3k
  • 12
  • 89
  • 122

Well, in the absence of any answers, perhaps this might help somebody to get a proper solution.

In order to show that there are infinitely many composite pairs of the form $n!\pm1$, it would suffice to prove that the expected number of prime numbers of the form $n!\pm1$ is relatively small, i.e. $$\limsup\limits_{N\to\infty}\frac{E|\{n=1,\dots,N|\ n!+1\ \mbox{or } n!-1\ \mbox{is prime}\}|}{N}=0.$$

Now, there is a note by Caldwell and Gallot (who were mentioned in Kevin Buzzard's comment avove) which contains a non-rigorous probabilistic argument yielding a heuristic estimate of the expectation.

In short, they start with a rough assumption that $n!\pm1$ behaves like a random variable and use the Stirling formula $\log n!\sim n(\log n-1)$. The prime number theorem shows that the probability of a random number of the size $\sim n!\pm1$ being prime is $$P_n\sim\frac{1}{n(\log n-1)},\quad n\gg 1. $$ Then they take into account Wilson's theorem and some other obvious obstacles to $n!\pm1$ behaving randomly, and obtain just a slightly weaker estimate $$P_n\sim\left(1-\frac{1}{4\log 2n}\right)\frac{e^\gamma}{n}$$ where $γ$ is the Euler–Mascheroni constant. The latter estimate translates into the estimate of the expected number of factorial primes of each of the forms $n!\pm1$, $n\leq N$
$$E_N\sim e^\gamma \log N,\quad N\gg 1.$$

Now, this is actually more than we need, and hopefully the probabilistic argument can be made rigorous to show that $E_N/N$ goes to $0$ as $N\to\infty$.

Edit added.

Is it true that for every positive integer $B$ there is a positive integer $N$ such that $N$ is divisible by all primes up to $B$, and $N \pm 1$ are both composite?

The modified question is easy. Take $N=(B!)^3$.

Andrey Rekalo
  • 22.3k
  • 12
  • 89
  • 122