TITLE: A consequence of Wilson's Theorem for primes $p \equiv 3 \pmod{4}$
QUESTION [1 upvotes]: For a prime $p$ of the form $p=4k+3$, prove that either $\big( \frac{p-1}{2} \big)! \equiv 1 \pmod{p}$ or $\big( \frac{p-1}{2} \big)! \equiv -1 \pmod{p}$. In other words, prove that $\big( \frac{p-1}{2} \big)!$ is a solution of the quadratic congruence $x^2 \equiv 1 \pmod{p}$.

How can I show that $\big( \frac{p-1}{2} \big)!$ belongs to those equivalent classes? 
I know that $k \equiv -(p-k) \pmod{p}$, and hence that 
$$\big( \frac{p-1}{2} \big)! \equiv (1)^{\frac{p-1}{2}} \frac{(p-1)!}{\big(\frac{p-1}{2}\big)!} \pmod{p}$$
Is it correct to argue that since the first factorial is in $\mathbb{Z}$, and $(p-1)!$ is congruent to $-1$ modulo $p$, then $\big( \frac{p-1}{2} \big)!$ can only be $1$ or $-1$?
Otherwise I don't see how I could prove the corollary. I know that the factors of $(p-2)!$ can be paired such that each pair is congruent to 1 modulo $p$, but that doesn't guarantee that the same holds for the factors of $\big( \frac{p-1}{2} \big)!$, does it?

REPLY [0 votes]: Let $q=(p-1)/2.$  Modulo $p$ we have $$-1\equiv (p-1)!\equiv q!\prod_{j=1}^q(q+j)\equiv$$ $$\equiv q!\prod_{j=1}^q(-1)(p-q-j)\equiv$$ $$\equiv q!(-1)^q\prod_{j=1}^q(p-q-j)=$$ $$=q!\cdot(-1)\cdot q!$$ because $(-1)^q=-1$ and $\{p-q-j: 1\le j\le q\}=\{k:1\le k\le q\}.$
For example, modulo $7$ we have $6!=3!(4)(5)(6)\equiv 3!(-3)(-2)(-1).$
{"set_name": "stack_exchange", "score": 1, "question_id": 3248148}