Remainder when dividing by 7?

GeneralMercer

New member
Joined
Mar 11, 2022
Messages
2
Just found a method to find remainder when divided by 7. so for 654987321 - remainder is found by pairing 3 digits from last, 654 987 321, then multiplying the pairs form left ,first by -1, second pair by 1 and so on and adding them +654-987+321= -12,then we divide it by 7 to get remainder .the method is clear when this sum is positive but when its is negative like -12,i get confused because I'm confused how to divide -12/7 , i think it should be like -12=7*(-1) -5(remainder)or should it be
-12=7*(-12)+2 (r=2).the second way to divide gets right remainder of 654987321/7 - r=2
 
Just found a method to find remainder when divided by 7. so for 654987321 - remainder is found by pairing 3 digits from last, 654 987 321, then multiplying the pairs form left ,first by -1, second pair by 1 and so on and adding them +654-987+321= -12,then we divide it by 7 to get remainder .the method is clear when this sum is positive but when its is negative like -12,i get confused because I'm confused how to divide -12/7 , i think it should be like -12=7*(-1) -5(remainder)or should it be
-12=7*(-2)+2 (r=2).the second way to divide gets right remainder of 654987321/7 - r=2

The method can be explained using modular arithmetic, because [imath]1,000,000\equiv 1 (\mod 7)[/imath] and [imath]1,000\equiv -1 (\mod 7)[/imath].

In this context, your answers of -5 and +2 are equivalent (mod 7); if you get -5, you can just add 7 to get the (positive) remainder, 2.

I prefer your second approach (with my correction above), which gets the positive remainder directly.
 
The method can be explained using modular arithmetic, because [imath]1,000,000\equiv 1 (\mod 7)[/imath] and [imath]1,000\equiv -1 (\mod 7)[/imath].

In this context, your answers of -5 and +2 are equivalent (mod 7); if you get -5, you can just add 7 to get the (positive) remainder, 2.

I prefer your second approach (with my correction above), which gets the positive remainder directly.
didn't get how mod fits into this, but i will try to get a postive remainder now onwards.
 
didn't get how mod fits into this, but i will try to get a postive remainder now onwards.
Are you saying you know what "mod" means and don't see the connection, or just that you've never heard of it? In the latter case, your method can be explained using mere algebra.
 
Top