# Variation of Wilson's Theorem

• Jun 22nd 2010, 12:13 PM
RonyPony
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}$
• Jun 22nd 2010, 01:03 PM
chiph588@
Quote:

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}$
• Jun 22nd 2010, 01:04 PM
chiph588@
Quote:

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}$