carmichael numbers

Download Carmichael numbers

If you can't read please download the document

Upload: adrian009

Post on 14-Dec-2015

214 views

Category:

Documents


2 download

DESCRIPTION

Carmichael numbers

TRANSCRIPT

Carmichaelnumbers The smallest Carmichael number is 561. It is not a prime: 561 = 311 17; yet it fools the Fermattest,because a560 = 1 (mod 561) forallvaluesof a relativelyprimeto 561. Foralong time it was thought that there might be only ?nitely many numbers of this type; now we knowtheyarein?nite,butexceedinglyrare. ThereisawayaroundCarmichaelnumbers,usingaslightlymorere?nedprimalitytest due to Rabin and Miller. Write N - 1 in the form 2tu. As before well choose a random base a and check the value of aN-1 mod N. Perform this computation by ?rst determining au mod N andthenrepeatedlysquaring,togetthesequence: au mod N, a2u mod N, ..., a2tu = aN-1 mod N. If aN-1 6= 1 mod N, then N is composite by Fermats little theorem, and were done. But if aN-1 = 1 mod N,weconductalittlefollow-uptest: somewhereintheprecedingsequence,we ranintoa 1 forthe?rsttime. Ifthishappenedafterthe?rstposition(thatis,if au mod N 6= 1),andiftheprecedingvalueinthelistisnot-1 mod N,thenwedeclare N composite. In the latter case, we have found anontrivial square root of 1modulo N: a numberthat is not1 mod N but that when squared is equal to 1 mod N. Such a number can only exist if N iscomposite(Exercise1.40). Itturnsoutthatifwecombinethissquare-rootcheckwith ourearlierFermattest, thenatleastthree-fourths ofthepossiblevaluesof a between 1 and N -1 willrevealacomposite N,evenifitisaCarmichaelnumber.