# Wilson's Theorem

1. Jul 29, 2013

### ribbon

1. The problem statement, all variables and given/known data
16!x is congruent to 5 (mod 17). Find x.

2. Relevant equations

3. The attempt at a solution
I am not sure if I have the answer correct, but I would like to know if I am following rules of modular arithmetic correctly.

According to Wilson's Theorem, (p-1)! + 1 is congruent to 0 mod(p) where p is prime.

So can I say for this problem since (17-1)! + 1 is congruent to 0 (modp) -> move the one to the other side of congruence to get 16! congruent to -1 (mod p) and multiply both sides of the congruence by -5, requiring x = -5?

2. Jul 29, 2013

### Dick

Sure x=(-5) works. So does x=12. So does x=(-22). There are a lot of solutions. What do they all have in common?

3. Jul 29, 2013

### ribbon

Hmm, well I can see that they are all 17 apart (17 like the modulus), is there a more mathematical way to express or suggest that?

4. Jul 29, 2013

### Dick

How about saying x=(-5) mod 17? Just saying x=(-5) isn't really telling the whole story. That's all.

5. Jul 29, 2013

### ribbon

Oh I see... thanks very much. That indeed demonstrates there to be more than one possible solution for x.