Remainder of 34! divided by 37 using Wilson's Theorem

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
6 replies · 6K views
duki
Messages
264
Reaction score
0

Homework Statement



Find the remainder when 34! is divided by 37.

Homework Equations



Wilson's Theorem

The Attempt at a Solution



I understand that (p-1)! = (-1)(mod p) and that (p-2)! = (1)(mod p). I don't understand how to apply this to (p-3)! though.
 
Physics news on Phys.org
you know that (p-2)! = 1 (mod p). So (p-3)!*(p-2) = 1 (mod p). In this situation, 34!*35 = 1 (mod 37). Call 34! 'x' and then solve 35x = 1 mod 37, which has a unique solution since gcd(35,37) = 1.
 
So do you do..

1 = 35x
1 = (-2)x
1 = (-2)(-18)

R = -18 + 37 = 19 ??
 
You're right. Thanks for the help.
 
I'm trying to find 33! / 37 now.

I have gotten to (-3)x = 18 (mod 37)... but I can't figure out what x is.