3

Here is a question from my number theory class.

Prove $$(p-k)!(k-1)!\equiv (-1)^k \text{ mod p} $$ Help please!

Kara
  • 173
  • 1
    Hi, and welcome to MSE. Please share what you've tried and what's giving you difficulty, as well as what you do understand about the problem. This way, people can give help that's actually relevant to you. –  Aug 06 '13 at 18:54
  • 4
    Have you heard of Wilson's theorem? – Daniel Fischer Aug 06 '13 at 18:54
  • 2
    Seems like a good candidate for induction... – Jim Aug 06 '13 at 18:58
  • @Ethan: lhf's answer could be written more succinctly as: $$ (p-1)!(1-1)!\equiv(-1)^1\pmod{p}\qquad\text{Wilson's Theorem} $$ Suppose that $(p-k)!(k-1)!\equiv(-1)^k\pmod{p}$ for some $k$, then $$ \begin{align} (p-k-1)!k! &=(p-k-1)!k(k-1)!\ &\equiv-(p-k-1)!(p-k)(k-1)!\pmod{p}\ &=-(p-k)!(k-1)!\ &\equiv(-1)^{k+1}\pmod{p} \end{align} $$ thus, it is true for all $k\ge1$. – robjohn Aug 06 '13 at 19:24
  • See also http://math.stackexchange.com/questions/99876/closed-form-for-p-n-pmodp-where-p-is-prime. – lhf Oct 03 '13 at 01:15

1 Answers1

10

$(p-k)!\ (k-1)! =$

$= (p-k)!\ (1\cdot 2\cdots (k-1))$

$\equiv (p-k)!\ ((p-1)\cdot (p-2)\cdots (p-(k-1))(-1)^{k-1}\ $ (because $p-t\equiv -t$)

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

Wilson's theorem is used in the last step.

So, this result is actually equivalent to Wilson's theorem, which is the case $k=1$.

lhf
  • 221,500