15
$\begingroup$

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 $n!\pm k$ has no primes.


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$?

$\endgroup$
  • 10
    $\begingroup$ Not likely to be known. I would regard a proof or disproof as out of reach of currently known mathematical methods. It's quite easy to come up with such intractable statements. $\endgroup$ – quasi Jul 14 at 17:45
  • 2
    $\begingroup$ See e.g. OEIS sequence A175193. $\endgroup$ – Robert Israel Jul 14 at 17:53
  • 1
    $\begingroup$ @quasi what separates this from those kind of statements is that this one has a good heuristic reason of why it may be true and is backed up with a lot of computational evidence. $\endgroup$ – Mathphile Jul 14 at 17:57
  • 4
    $\begingroup$ Or you want to say every prime has another prime at distance n!. This is unlikely to be deciphered as it would require finding the relationship between prime numbers and factorial within additive group. However it is not bad to try figuring out the statistics of the same, maybe some form of what distance between two primes may contain can help. At the moment I see nothing in any theory that can help about this to any extent (apart from statistical analysis of course). $\endgroup$ – alex.peter Jul 14 at 18:00
  • 2
    $\begingroup$ @quasi: Typically this kind of statements are coming from an initial analysis that confirms that we have not one or two but the abundant number of cases as n increases. In this particular case the situation is maybe linear as it looks being linear at first. The trick is, we see the number increasing abundantly yet we cannot prove that we have one regular case :( Poor us and our understanding of primes :( $\endgroup$ – alex.peter Jul 14 at 18:16
3
$\begingroup$

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.

$\endgroup$
  • 2
    $\begingroup$ There's almost always at least 1 n eliminated in the first p values mod p. $\endgroup$ – Roddy MacPhee Jul 15 at 1:00
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.