【導(dǎo)讀】Forexample:{2,3,5,7,11,13,17,…}. notveryuseful.n=a*b*c. Or,100=5*5*2*2. 143=11*13. factorsof1,3,7,21.theleastpowers.Forexample,125=53and200=23*52. GCD(125,200)=20*52=25. willbe1.GCD(10,21)=1. itselfand1.PierredeFermat(1601-1665)wasalawyerby. whenn>2.HistoryCont.OneofFermat’sbookscontaineda. moderntechniques.p,then...ap-11(modp).apa(modp).primalitytesting.ton.Asyoucanseefrom(5)and(7),(n)will. *Q)=(P-1)*(Q-1),ifPandQareprime.IfGCD(a,p)=1,anda<p,then. a(p)1(modp).Let’stestthetheorem:. Ifa=5andp=6. Then(6)=(2-1)*(3-1)=2. So,5(6)=25and25=24+1=6*4+1. =>25=1(mod6)OR25%6=1. Italsofollowsthata(p)+1a(modp)sothat. primetoa.