I know this is a very typical question for modular arithmetic but still I haven't found a comprehensive explanation for this question, so I'm posting it here. So here goes:
I need to find the remainder when 1938 is divided by 38.
Here is my attempt:-
19≡19(mod38)
192≡192(mod38)⟹192≡19(mod38)
⟹(192)2≡192(mod38)
⟹194≡19(mod38)
⟹198≡19(mod38)
⟹1916≡19(mod38)
⟹1932≡19(mod38)
And carrying on I do get the answer that 1938≡19(mod38)
But this seems a very cumbersome task, for higher powers it may be hard, or if 19 would not have been a factor of 38, then probably I wouldn't have been able to develop the pattern. Is there an easier and more methodical way to solve this using number theory/modular arithemtic?
I think I may have seen a solution involving Euler's Totient Function, but it was a while ago and I simply can't seem to relate it with this question and cant remember what the solution was. Can that be used to simplify this question?
Answer
Precisely, Euler's totient function comes to be very handy for such problems. Euler's theorem states that if gdc(a,m)=1, then aϕ(m)≡1(modm). In your case, since gdc(19,38)≠1, the fact that 192≡19(mod38) is crucial, and from that one gets 19n≡19(mod38), for every n∈N. For instance, if you want to calculate the remainder of 1738 when divided by 38, first observe that gdc(17,38)=1 (here we can use Euler's theorem), and that ϕ(38)=18. So, since 38=2×18+2, we have
1738=172×18+2=(1718)2172≡172≡23(mod38).
That's the "canonical" way.
No comments:
Post a Comment