# Wilson's Theorem

1. Jun 13, 2012

### Bleys

I guess this would be an elementary number theory question, but it's in Advanced Algebra by Rotman, so I figured it would go here. I apologize if it's wrong.

If p is an odd prime and $a_{1},...,a_{p-1}$ is a permutation of $1,2,...,p-1$ then there exist $i \neq j$ with $ia_{i} \equiv ja_{j} modp$.

It says to use Wilson's Theorem, but I can't seem to be getting anywhere with it.

I thought that for any i we have
$ia_{i} = -i(a_{1}...a_{i-1}a_{i+1}...a_{p-1})^{-1} modp$ by Wilson.

I figured the j=-i modp, which is not equal to i since p is odd. But I'm not sure how to show
$(a_{1}...a_{i-1}a_{i+1}...a_{p-1})^{-1} = a_{-imodp}$
if the assumption j=-i is even correct. Any help, please?

2. Jun 13, 2012

### DonAntonio

Gee, you did the hardest parts and you were almost there...! Anyway, by Wilson's Theorem:
$$a_1\cdot a_2\cdot\ldots\cdot a_{p-1}=-1\Longrightarrow \frac{-1}{a_i}=\frac{a_1\cdot a_2\cdot\ldots\cdot a_{p-1}}{a_i}=a_1\cdot\ldots a_{i-1}a_{i+1}\ldots a_{p-1}$$

DonAntonio

Ps Of course, the above is operations modulo p