Conjecture: "For every prime $k$ there will be at least one prime of the form $n! \pm k$" true?

Using PARI/GP, I searched for primes of the form $n!\pm k$ where $k \ne 2$ is prime and $n\in \Bbb{N}$.

With the help of user Peter, we covered a range of $k \le 10^7$ and couldn't find a prime $k$ for which there is no prime of either form $n!+k$ or $n!-k$.


Observations:

$(1)$ When $n \ge k$, $n! \pm k$ cannot be prime as $k$ will be a factor of $n! \pm k$. This means that there are a finite number of primes of the form $n! \pm k$ for each $k$.

$(2)$ As $k$ increases, the number of primes of the form $n!\pm k$ also seems to increase. The reason for this is that as $k$ increases, the number of $n$ for which $n!\pm k$ may be prime also increases as all $n \lt k$ may give prime $n!\pm k$.


For those who want to carry forward the search here is the PARI/GP code:

for(k=1, 10^4,b=0; for(n=1, prime(k), if(ispseudoprime(n!+prime(k))==1, b=b+1)); print([prime(k), b]))

The first column of output will give the $k$ and the second column will the number of times $n!+k$ is prime for that given $k$. Here are the first few lines of output:

[2, 1]
[3, 1]
[5, 3]
[7, 4]
[11, 5]
[13, 3]
[17, 6]
[19, 7]

For rest of the output computed till now click here.


Question:

Is there any prime $k\ne 2$ for which there are no primes of the form $n!\pm k$?


Extra:

I decided to test some other factorial-like functions and they gave surprisingly similar results.

For any prime $k$, there is at least one prime of the form:

$(1)$ $p_n$#$\pm k$, where $p_n$# is the primorial function and $k\gt 5$. This was verified for the range of $k\le 10^7$.

$(2)$ $n!!\pm k$, where $n!!$ is the double factorial and $k\gt 2$. This was verified for the range $k\le 10^5$.

$(3)$ $2n!!\pm k$ where $n$ can only odd and $k\gt 5$. This was verified for the range $k\le 10^5$.

I find it strange that a function that grows relatively slow like $2^n+2131$ doesn't have a single prime even for $n\le 10^4$, but a fast-growing, factorial-like function like $n!+prime(k)$ has primes for every single $k$ even after being restricted by $n \lt k$.


Solution 1:

Under the random model for the primes I find the probability there is a prime $n!+k$ is about $a_k= \prod_{n=1}^k (1-\frac{\ln (n!+k)}{n!+k})$ and the probability that for some $K\ge K_0$ there is no prime $n!+K$ is $$f(K_0)=\sum_{K\ge K_0} (1-a_K)\prod_{k=K_0}^{K-1} a_k $$ Then we need to estimate $a_k$ and $f(K_0)$, the random model says your conjecture has a chance to hold only if $\lim_{K_0 \to \infty} f(K_0)=0$, otherwise $\forall K_0, f(K_0) = 1$ and under the random model for some $k$ there is no prime $n!+k$ almost surely.

Solution 2:

I am not sure, but, it seems that if the Diophantine equation in $4$ variables $$p^2-3p+2=\sum_{j=2}^{p-1}(4b_jc_j+2b_j+2c_j-j!)$$ does not have solutions with the conditions $p\geq 7$ and $b_j,c_j \in \mathbb N$ and $4b_jc_j+2b_j+2c_j-j!>0$ for $j=2,...,p-1$ then you should have a prime in the set $\{2!+p,...,(p-1)!+p\}$

This comment-answer can be used to justify some comments that your conjecture could be hard.