Suppose that $p$ is prime and $≡ 3\bmod4$ then $((p-1)/2)!≡-1\bmod p$ or $((p-1)/2)!≡1\bmod p$

Prove or disprove:

Suppose that $p$ is prime and $≡ 3\bmod4$ then $((p-1)/2)!≡-1\bmod p$ or $((p-1)/2)!≡1\bmod p$

After I checked it I see it is true statement

so by Wilson's theorem we have $(p-1)!≡-1\bmod p$

so $1\cdot2\cdot3\cdots((p-1)/2)((p+1)/2)\cdots(p-1) ≡ -1\bmod p$

so $(p-1)/2)!((p-1)/2)! -2) ≡ -1\bmod p$

then $((p-1)/2)! ≡ -1\bmod p$ or $((p-1)/2)! ≡ 1\bmod p$

is which I did right?

• When you write $p-1/2$, it means $p-0.5$. Obviously that's not what you mean because it doesn't make sense. You really mean $(p-1)/2$, or better yet $\frac {p-1}2$. – Matt Samuel Dec 7 '17 at 4:58

Your idea of using Wilson's theorem is correct, but when you get to $$1\cdot2\cdot3\cdots\frac{p-1}2\cdot\frac{p+1}2\cdots(p-1) ≡ -1\bmod p$$ you need to take a different approach. Rewrite $p-1$ as $-1$, $p-2$ as $-2$ and so on until you get $$1\cdot2\cdot3\cdots\frac{p-1}2\cdot\left(-\frac{p-1}2\right)\cdots(-1)≡-1\bmod p$$ Because $p\equiv3\bmod4$, the number of terms is singly even, so there are an odd number of terms that have become "negative". The above is thus equivalent to $$-\left(1\cdot2\cdot3\cdots\frac{p-1}2\right)^2≡-1\bmod p$$ $$\left(\frac{p-1}2!\right)^2≡1\bmod p$$ $$\frac{p-1}2!≡\pm1\bmod p$$