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

Click For Summary
To find the remainder of 34! divided by 37 using Wilson's Theorem, it is established that (p-1)! ≡ -1 (mod p) for a prime p. Thus, 34! ≡ -1 * 35^(-1) (mod 37). The discussion revolves around solving the equation 35x ≡ 1 (mod 37) to find the modular inverse of 35. The calculations lead to confusion regarding the correct value of x, with attempts to derive it from the equation (-2)x ≡ 1 (mod 37). Ultimately, the use of the extended Euclidean algorithm is suggested to find the correct solution for x.
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 ??
 
35*19 isn't 1 mod 37. Don't you mean 1=(-2)(-19)? It's easy enough to check your answers with a quick calculation.
 
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.
 

Similar threads

Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 27 ·
Replies
27
Views
3K
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
2K
Replies
4
Views
1K