Are there infinitely many primes $p$ such that $\frac{(p-1)! +1}{p}$ is prime?

The first primes solution are at OEIS as A050299 : $$1, 5, 7, 11, 29, 773, 1321, 2621$$ with the comment "There are no other terms up to $6550$ and the corresponding next prime has more than $22150$ digits. No more terms below $30941$."

Mike Oakes added a comment (and its correction since an important factor was missing) :
"Asymptotically, the probability that $p$ is prime is $\dfrac 1{\log(p)}$, and that $N =\dfrac {1+(p-1)!}p$ is prime is $\displaystyle \frac 1{\log(N)} \approx \frac 1{\log((p-2)!)} \approx\frac 1{p\log(p)}$ by Stirling.

CORRECTION: since no prime $< p$ divides $N$, the probability that $N$ is prime must be multiplied by the factor $\;e^{\gamma}\log(p)$ (using Mertens' theorem), where $\gamma$ is Euler's constant, with $e^{\gamma}=1.7810724\cdots$

So the expected number of such primes between $p_1$ and $p_2$ is of order : $$ e^{\gamma}\;\int_{p_1}^{p_2} \frac{\log(x)\;dx}{x\log(x)^2} = e^{\gamma}(\log(\log(p_2))-\log(\log(p_1)))$$ which is unbounded as $\,p_2\to\infty$.

Putting in the numbers, this predicts:

  1. that for $\;2 \le p \le 30941$ there should be $4.8$ such primes, which is in reasonable agreement with the actual number found ($7$); and
  2. that asymptotically there is on average one such prime between $p_1$ and $p_2$ whenever $p_2 = (p_1)^{1.753....}$

Mike Oakes (with error pointed out by David Farmer, Dean Hickerson, Paul Jobling, Carl Pomerance, Bjorn Poonen, Noam D. Elkies)"


NEW PROBLEM:
Let's consider with more care the new problem for $n$ integer : $$C_1(n)= \left\lfloor\frac{(n-2)! +1}{n}\right\rfloor$$ I obtained the first solutions : $$7,29,61,139,383(?)$$

I'll distinguish two cases :

  • $n$ not prime which is true with probability $\approx 1-\dfrac 1{\log(n)}$ multiplied by the $\dfrac 1{n\,\log(n)}$ term from Mike Oakes' analysis. The partial contribution for $n\in(n_1,n_2)$ will then be of order : $$\tag{1}\int_{n_1}^{n_2} \left(1-\frac 1{\log(x)}\right)\frac{dx}{x\log(x)} = \left.\log(\log(x))+\frac 1{\log(x)}\right|_{n_1}^{n_2}\approx\left.\log(\log(x))\right|_{n_1}^{n_2}$$
  • for $n=p$ prime and using Wilson's theorem I got $\;(p-1)(p-2)!\equiv (p-1)\pmod{p}\;$ and (since $(p,p-1)=1$) $\;(p-2)!\equiv 1\pmod{p}\;$ so that $\;\displaystyle \left\lfloor \frac{(p-2)!+1}p\right\rfloor=\frac{(p-2)!-1}p$ but $(p-2)!-1$ can't have divisors smaller than $p-1$ and thus we still can't have divisors $<p$ when $p$ is prime $>3$ (another result $\;(p-1)\left\lfloor \frac{(p-2)!+1}p\right\rfloor=\frac{(p-1)!+1}p-1\,$).
    The repartition for $n=p$ prime will thus be asymptotically the same as in your first problem : $$\tag{2}e^{\gamma}\;\int_{n_1}^{n_2} \frac 1{\log(x)}\frac{\log(x)\;dx}{x\log(x)} = \left.e^{\gamma}\;\log(\log(x))\right|_{n_1}^{n_2}$$ Combining $(1)$ and $(2)$ we get an average number of solutions in $(n_1,n_2)$ of order : $$\left(1+e^{\gamma}\right)(\log(\log(n_2))-\log(\log(n_1)))$$ and may hope for one solution going from $n_1$ to $n_2=(n_1)^c$ with $c=e^{1/(1+e^{\gamma})}\approx 1.433$ (instead of $e^{1/e^{\gamma}}\approx 1.753$ previously).