Find (−77) mod 9, the remainder r with 0 ≤ r < 9.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −77n = 9
(−77) mod 9 =
2.Easy
Use Euclid’s algorithm to find gcd(472, 208).
a = 472b = 208
gcd(472, 208) =
3.Medium
Find the smallest positive integer x with x ≡ 1 (mod 5) and x ≡ 4 (mod 6).
x ≡ 1 (mod 5)x ≡ 4 (mod 6)
x =
4.Medium
Find Euler’s totient φ(169), the number of integers from 1 to 169 that are coprime to 169.
n = 169 = 132
φ(169) =
5.Hard
An RSA key uses p = 37, q = 41 and e = 23. Decrypt the ciphertext c = 1192: find the message m.
p = 37q = 41e = 23c = 1192
m =
6.Hard
An RSA key uses p = 23, q = 47 and e = 7. Decrypt the ciphertext c = 834: find the message m.
p = 23q = 47e = 7c = 834
m =
Answer key
- 1. (−77) mod 9 = 4
- 2. gcd(472, 208) = 8
- 3. x = 16
- 4. φ(169) = 156
- 5. m = 14
- 6. m = 133
Full step-by-step solutions: practise this topic on examproblems.com.