Processing math: 100%
 
+0  
 
0
2
1537
2
avatar

Evaluate30![mod 899]

 Nov 21, 2014

Best Answer 

 #2
avatar+26397 
+5

30! [mod 899] ?

30!mod899?=

 899=2931=pq| let p=29 and q=31 so \textcolor[rgb]{1,0,0}{p and q are relatively prim!} 

I.   30!modp=0, because p=29 is divider of 30! (30!=302928...321)  

 30!modp=r, if p=29 we have r=0 

II.  30!modq=sq=31 is a prime number so (311)!1mod31 [Wilson] 

 (311)!1+31mod31 or 30!30mod31 we have s=30 

III. 

Since p  and q  are relatively prime, there are integers a  and b  such that  ap+bq=1. You can find a  and b  using the Extended Euclidean algorithm.

http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm

So a=46 and b=-43, so 29*(46) + 31*(-43) = 1

IV.

Then

  30!mod(pq)=aps+bqr30!mod(899)=462930+(43)310=462930=40020 

V.

30!mod899=40020mod899=464

 Nov 21, 2014
 #1
avatar+33657 
+5

Just use the on-site calculator:

(30!)mod(899)=464

.

 Nov 21, 2014
 #2
avatar+26397 
+5
Best Answer

30! [mod 899] ?

30!mod899?=

 899=2931=pq| let p=29 and q=31 so \textcolor[rgb]{1,0,0}{p and q are relatively prim!} 

I.   30!modp=0, because p=29 is divider of 30! (30!=302928...321)  

 30!modp=r, if p=29 we have r=0 

II.  30!modq=sq=31 is a prime number so (311)!1mod31 [Wilson] 

 (311)!1+31mod31 or 30!30mod31 we have s=30 

III. 

Since p  and q  are relatively prime, there are integers a  and b  such that  ap+bq=1. You can find a  and b  using the Extended Euclidean algorithm.

http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm

So a=46 and b=-43, so 29*(46) + 31*(-43) = 1

IV.

Then

  30!mod(pq)=aps+bqr30!mod(899)=462930+(43)310=462930=40020 

V.

30!mod899=40020mod899=464

heureka Nov 21, 2014

0 Online Users