TITLE: A consequence of Wilson's Theorem
QUESTION [6 upvotes]: By Wilson's Theorem we know that $$(p-1)! \equiv -1 \mod p.$$
A consequence of this is apparently  $$(p-(k+1))!k! \equiv (-1)^{k+1} \mod p$$ where $0 \leq k \leq p-1$.
I was told to think of it like so,
Let $0 \leq i \leq p-1$.  Then $(p-i)\equiv -i \mod p.$
I'm interested in proceeding in the above way, but I'm not sure how to.

REPLY [4 votes]: An alternative approach: $$\binom{p-1}{k} \equiv (-1)^k\pmod p\,; 0\leq k\leq p-1$$ by induction, since $\binom{p-1}{k}+\binom{p-1}{k+1} = \binom{p}{k+1} \equiv 0\pmod p$ when $k<p-1$. (When $k=0$ this is obvious.)
But $\binom{p-1}{k} = \frac{(p-1)!}{k!(p-1-k)!}$ So: $$(-1)^k k!(p-1-k)! \equiv (p-1)!\equiv -1\pmod p$$
And finally:
$$k!(p-1-k)! \equiv (-1)^{k+1}\pmod p$$