1 Answers

Best Answer

Definitions
Division algorithm Let a be an integer and d a positive integer. Then there are nique integers q and r with 0 <= r < d such that a=dq+r
q is called the quotient and r is called the remainder
q=a div d
r=a mod d
Solution
3 mod 7
Since -17 is smaller than 3, we should be able to obtain -17 by consecutively subtracting 7 from 3 if -17 ≡ 3 mod 7.
3 mod 7
≡ 3-7 mod 7
≡ -4 mod 7
≡ -4-7 mod 7
≡ -11 mod 7
≡ -11-7 mod 7
≡ -18 mod 7
We then note that 3 mod 7 is ≡alent with -11 and -18. 3 mod 7 is then not ≡alent with -17, since -18 < -17 < -11.
Note: -17 mod 7 ≡ 4 mod 7