# Number Theory: Wilson's Theorem

1. Nov 2, 2008

### mathsss2

I posted this question but I am not getting anywhere with this question, any help would be very appreciated:

1. let $$p$$ be odd prime explain why: $$2*4*...*(p-1)\equiv (2-p)(4-p)*...*(p-1-p)\equiv(-1)^{(p-1)/2}*1*3*...*(p-2)$$ mod $$p$$.

2. Using number 2 and wilson's thereom [$$(p-1)!\equiv-1$$ mod p] prove $$1^23^25^2*....*(p-2)^2\equiv(-1)^{(p-1)/2}$$ mod $$p$$

Thanks.

2. Nov 3, 2008

### mathsss2

Update: I got #2, I still don't know how to do #1.

3. Nov 4, 2008

### dodo

Let me give names to the individual expressions in question 1: call them, from left to right, A(p), B(p), C(p), so that your question 1 becomes
$$A(p) \equiv B(p) \equiv C(p) \mbox{ (mod p)}$$

Now, B(p) and C(p) are the same expression. If you multiply by -1 each of the factors in B(p), (that's (p-1)/2 factors), they become (p-2)(p-4)...(p-(p-1)), that is, 1*3*...(p-2).

Now you only need to prove that either of B(p) or C(p) is congruent to A(p) modulo p. Just observe that $$-1 \equiv p-1 \mbox{ (mod p)}$$, and also $$-3 \equiv p-3 \mbox{ (mod p)}$$, and also ...

4. Nov 5, 2008

### robert Ihnot

The fact of the matter is that $$2-p \equiv 2 Mod p$$ Thus the first two expressions are of equal value. As Dodo has already explained.