# Variation of Wilson's Theorem

• June 22nd 2010, 11:13 AM
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}$
• June 22nd 2010, 12: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}$
• June 22nd 2010, 12: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}$