By a modified version of the Fermat's little theorem we obtain that aϕ(n)≡1 mod n whenever (a,n)=1. But my professor accidentally gave this question to calculate 29999 mod 100. So everyone in the class calculated it using the theorem since they forgot to check that (a,n)=1. But to my surprise everyone got 88 as the answer which is actually the correct answer.
So I first saw what happens in the case of mod 10. Here 24≡6 mod 10. But magically enough this number multiplies with powers of 2 as if it were identity i.e.
2⋅6≡2(mod10)
4⋅6≡4(mod10)
6⋅6≡6(mod10)
8⋅6≡8(mod10)
After seeing this I checked what happens in the case of 100. Similar thing happens even here instead 240≡76(mod100). Now 76 acts like 6 just that 76∗2≠2 but otherwise 76∗4=4 and 76∗8=8 and so on. Can anyone explain as to why it is happening here and does it happen in other cases as well.
Answer
What's going on here is a direct result of the prime factorizations of 10=2⋅5 and 100=22⋅52. Try writing it like this:
2⋅6≡2⋅(5+1)≡2⋅5+2⋅1≡0+2(mod10)4⋅6≡4⋅5+4⋅1≡0+4(mod10)
and so on. Since 6=5+1, multiplying by an even number will "cancel out" the 5, and you'll just be left with the 1, acting like an identity. Same thing is going on with 76=75+1=3⋅25+1. To cancel out the 3⋅25, you need an even number that's divisible by 4 (4⋅25=100). If you test 76⋅6(mod100), you should find that the result is nonzero.
This sort of thing will happen whenever you're calculating mod n=∏mi=1peii (here ∏mi=1peii is the prime factorization of n) and you look at multiplication by a number k of the form 1+(anything)(product of some of the pi's). Whenever you multiply k by any number whose factorization includes the pi's not appearing in the "product of some of the pi's" (counted with multiplicity), you'll cancel off the second term of k and be left essentially multiplying by 1. As an easy example, look mod 6. Multiplication by 3 acts like the identity for 3 and 0 because 3=1+2 and 6=2⋅3.
No comments:
Post a Comment