# Math Help - Variation of Wilson's Theorem

1. ## Variation of Wilson's Theorem

I am having troubles with this problem, I tried using a proof similar to that of Wilson's theorem but I can't get it to work! Any help would be greatly appreciated.

Show that if p is prime and $2 \leq k < p$ then $(p-k)!(k-1)! \equiv (-1)^k \pmod{p}$

2. Originally Posted by RonyPony
I am having troubles with this problem, I tried using a proof similar to that of Wilson's theorem but I can't get it to work! Any help would be greatly appreciated.

Show that if p is prime and $2 \leq k < p$ then $(p-k)!(k-1)! \equiv (-1)^k \pmod{p}$
$(p-k)!(k-1)!\equiv (p-k)!(k-1-p)(k-2-p)\cdots(1-p)\equiv (p-k)!(p-k+1)(p-k+2)\cdots(p-1)(-1)^{k+1}=(-1)^{k-1}(p-1)!\equiv (-1)^k \bmod{p}$

3. Originally Posted by RonyPony
I am having troubles with this problem, I tried using a proof similar to that of Wilson's theorem but I can't get it to work! Any help would be greatly appreciated.

Show that if p is prime and $2 \leq k < p$ then $(p-k)!(k-1)! \equiv (-1)^k \pmod{p}$
$(p-k)!(k-1)!\equiv (p-k)!(k-1-p)(k-2-p)\cdots(1-p)$

$\equiv(p-k)!(p-k+1)(p-k+2)\cdots(p-1)(-1)^{k-1}=(-1)^{k-1}(p-1)!\equiv (-1)^k \bmod{p}$