Find (−102) mod 4, the remainder r with 0 ≤ r < 4.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −102n = 4
(−102) mod 4 =
2.Easy
Find (275·288 + 348) mod 8 without multiplying out the large numbers: reduce first.
n = 8
(275·288 + 348) mod 8 =
3.Medium
Find the inverse of 11 modulo 73: the number x with 0 < x < 73 and 11·x ≡ 1 (mod 73).
a = 11n = 73
11−1 mod 73 =
4.Medium
Find the inverse of 25 modulo 28: the number x with 0 < x < 28 and 25·x ≡ 1 (mod 28).
a = 25n = 28
25−1 mod 28 =
5.Hard
Encrypt the message m = 283 with the RSA public key (n, e) = (299, 17). Find the ciphertext c.
n = 299e = 17m = 283
c =
6.Hard
Use repeated squaring to find 3436 mod 41.
a = 34k = 36n = 41
3436 mod 41 =
Answer key
- 1. (−102) mod 4 = 2
- 2. (275·288 + 348) mod 8 = 4
- 3. 11−1 mod 73 = 20
- 4. 25−1 mod 28 = 9
- 5. c = 134
- 6. 3436 mod 41 = 25
Full step-by-step solutions: practise this topic on examproblems.com.