Find 107 mod 9, the remainder r with 0 ≤ r < 9.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 107n = 9
107 mod 9 =
2.Easy
Find (−139) mod 6, the remainder r with 0 ≤ r < 6.
a = −139n = 6
(−139) mod 6 =
3.Medium
Find Euler’s totient φ(51), the number of integers from 1 to 51 that are coprime to 51.
n = 51 = 3·17
φ(51) =
4.Medium
Find Euler’s totient φ(19), the number of integers from 1 to 19 that are coprime to 19.
n = 19 = 19
φ(19) =
5.Hard
Use repeated squaring to find 1362 mod 45.
a = 13k = 62n = 45
1362 mod 45 =
6.Hard
Encrypt the message m = 813 with the RSA public key (n, e) = (2021, 19). Find the ciphertext c.
n = 2021e = 19m = 813
c =
Answer key
- 1. 107 mod 9 = 8
- 2. (−139) mod 6 = 5
- 3. φ(51) = 32
- 4. φ(19) = 18
- 5. 1362 mod 45 = 34
- 6. c = 1728
Full step-by-step solutions: practise this topic on examproblems.com.