Let $p$ be a prime number and $r$ an integer such that $1 \le r \lt p$. If $(-1)^rr! \equiv 1 \pmod p$, then $(p-r-1)! \equiv -1 \pmod p$
I know that $n$ is a prime if and only if $(n -2)! \equiv 1 \pmod n$ and Wilson’s theorem: $p$ is a prime if and only if $(p - 1)! \equiv -1 \pmod p$. Still I haven’t found the right relation between them.
I would appreciate some help. Thanks.