Let $p$ be a positive integer; if $2p+1$ is prime then it is easily checked that
$$(2p+1)\mid\left(\binom{2p}{p}+(-1)^{p-1}\right);$$


conversely I conjecture that if the above divisibility assumption holds, then $2p+1$ is a prime number. Is this true?



If $\binom{2p}{p}$ is $(-1)^{p-1} \bmod 2p+1$ is then $2p+1$ prime?
(Also from my comment, when the question was closed)


From Robert Israel's single example $2p+1=5907$ I found in Sloane Encyclopaedia the general picture:


A [*Catalan pseudoprime*](https://en.wikipedia.org/wiki/Catalan_pseudoprime) is an odd non-prime $2q+1$ satisfying $$2q+1\;\big|\;(-1)^qC\_q-2,$$ where $C\_m$ is the [Catalan number](https://en.wikipedia.org/wiki/Catalan_number) $\frac1{m+1}\begin{pmatrix}2m \\ m\end{pmatrix}$. 


Using that $q+1$ and $2q+1$ are coprime and $2(q+1)\equiv 1[2q+1]$, we see that the above divisibility condition is equivalent to the initial condition $(2q+1)\mid\binom{2q}{q}+(-1)^{q-1}$. So the Catalan pseudoprimes are precisely those odd non-primes $2q+1$ satisfying $(2q+1)\mid\binom{2q}{q}+(-1)^{q-1}$.


There are only 3 known Catalan pseudoprimes; they form [Sloane's sequence A163209](https://oeis.org/A163209); here are their prime factorization


* $5907=3\times 11\times 179$
* $1194649=1093^2$
* $12327121=3511^2$


The latter two are the squares of the two known [Wieferich primes](https://en.wikipedia.org/wiki/Wieferich_prime).


