Find (−148) mod 5, the remainder r with 0 ≤ r < 5.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −148n = 5
(−148) mod 5 =
2.Easy
Find 359 mod 3, the remainder r with 0 ≤ r < 3.
a = 359n = 3
359 mod 3 =
3.Medium
Find the inverse of 37 modulo 59: the number x with 0 < x < 59 and 37·x ≡ 1 (mod 59).
a = 37n = 59
37−1 mod 59 =
4.Medium
Find the inverse of 31 modulo 43: the number x with 0 < x < 43 and 31·x ≡ 1 (mod 43).
a = 31n = 43
31−1 mod 43 =
5.Hard
Use repeated squaring to find 65144 mod 92.
a = 65k = 144n = 92
65144 mod 92 =
6.Hard
Solve 30x ≡ 36 (mod 63). Give the smallest positive solution x.
30x ≡ 36 (mod 63)
x =
Answer key
- 1. (−148) mod 5 = 2
- 2. 359 mod 3 = 2
- 3. 37−1 mod 59 = 8
- 4. 31−1 mod 43 = 25
- 5. 65144 mod 92 = 73
- 6. x = 18
Full step-by-step solutions: practise this topic on examproblems.com.