Find (776·53 + 281) mod 5 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 5
(776·53 + 281) mod 5 =
2.Easy
Find 111² mod 8 without multiplying out the large numbers: reduce first.
n = 8
111² mod 8 =
3.Medium
Find the inverse of 65 modulo 89: the number x with 0 < x < 89 and 65·x ≡ 1 (mod 89).
a = 65n = 89
65−1 mod 89 =
4.Medium
Find the inverse of 74 modulo 97: the number x with 0 < x < 97 and 74·x ≡ 1 (mod 97).
a = 74n = 97
74−1 mod 97 =
5.Hard
Encrypt the message m = 383 with the RSA public key (n, e) = (517, 7). Find the ciphertext c.
n = 517e = 7m = 383
c =
6.Hard
Use repeated squaring to find 4107 mod 21.
a = 4k = 107n = 21
4107 mod 21 =
Answer key
- 1. (776·53 + 281) mod 5 = 4
- 2. 111² mod 8 = 1
- 3. 65−1 mod 89 = 63
- 4. 74−1 mod 97 = 59
- 5. c = 103
- 6. 4107 mod 21 = 16
Full step-by-step solutions: practise this topic on examproblems.com.