Find 253 mod 12, the remainder r with 0 ≤ r < 12.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 253n = 12
253 mod 12 =
2.Easy
Find 86 mod 3, the remainder r with 0 ≤ r < 3.
a = 86n = 3
86 mod 3 =
3.Medium
Find Euler’s totient φ(34), the number of integers from 1 to 34 that are coprime to 34.
n = 34 = 2·17
φ(34) =
4.Medium
Find the inverse of 59 modulo 71: the number x with 0 < x < 71 and 59·x ≡ 1 (mod 71).
a = 59n = 71
59−1 mod 71 =
5.Hard
Use repeated squaring to find 52122 mod 55.
a = 52k = 122n = 55
52122 mod 55 =
6.Hard
Encrypt the message m = 390 with the RSA public key (n, e) = (703, 13). Find the ciphertext c.
n = 703e = 13m = 390
c =
Answer key
- 1. 253 mod 12 = 1
- 2. 86 mod 3 = 2
- 3. φ(34) = 16
- 4. 59−1 mod 71 = 65
- 5. 52122 mod 55 = 9
- 6. c = 298
Full step-by-step solutions: practise this topic on examproblems.com.