Professional Documents
Culture Documents
Modular Arithmetic
1 Modular Arithmetic
Divisibility of 5
10 is equivalent to 20 mod 5. ie 10 and 20 gives the same remainder when
divided by 5.
33 ≡ 43 ≡ 3 (mod5)
1
0(mod5) 1(mod5) 2(mod5) 3(mod5) 4(mod5)
5 6 7 8 9
50 11 22 63 99
(−3) (−2) (−1)
Difference between any two numbers from the same group is divisible by 5.
a ≡ b(mod5) if and only if 5 divides a − b.
a ≡ b(modn) if and only if n divides a − b.
5 − 55 = (−50) .
Note
1. a ≡ b(modn), then a ≡ b ± nk(modn)
3. We try to find the powers that gives remainders ±1 . These are very
useful.
Properties :
1. Any perfect square is 0, 1 mod 4.
(mod4)
a(mod4) a2 (mod4)
0 0
1 1
2 4≡0
3 9≡1
2
2) Any perfect square is 0, 1 mod 3.
a(mod3) a2 (mod3)
0 0
1 1
2 4≡1
• Solved Examples :
Applications
1. Find the reminder when 9564322189675218 is divided by 8.
2. Find the reminder when 75429818902198 is divided by 8.
3. 6925621987260191 (mod9)
4. 1470689192 (mod7)
5. Prove that 299 + 1 is divisible by 11.
6. Determine the last 2 digits of the number 72349 .
3
12. Find all integers solutions to the equation a2 + 1 = 4b2
13. Find all integers solutions to the equation a2 + 7 = 999b
14. Prove that a3 − b3 = 2012 has no solution over integers.