Wednesday, November 18, 2015

linear algebra - how to calculate the remainder when the number is divided by 1000


n=(220141)/3 what is the remainder when it is divided by 1000. i wrote 2 as 31 and proceeded but that only helped me prove n is a integer but i dont know how to find the remainder on dividing it by 1000. well im guessing it involves some number theory theorom. please guide me.(i was thinking of using euler totient theorom but could not do so)


Answer



Without being clever, let's brute force our way through.


We want to understand 220141(mod1000). Notice that gcd(3,1000)=1, so 3 has a modular inverse (a quick check shows that it's 667).



Now, how do we find 220141(mod1000)? As gcd(2,1000)=2, we should worry about the 2 factor. So we think of 1000 as 2353.


Clearly 220140(mod23). And as φ(53)=100, we know that 220142149(mod125). Putting these together, perhaps with the Chinese Remainder Theorem or by quick brute force (there are only 8 things to check, afterall), we see that 22014384(mod1000).


Thus 220141383(mod1000). And thus 2201413667(220141)667383461(mod1000).


So the remainder is 461.


No comments:

Post a Comment

analysis - Injection, making bijection

I have injection f:AB and I want to get bijection. Can I just resting codomain to f(A)? I know that every function i...