Find (−146) mod 5, the remainder r with 0 ≤ r < 5.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −146n = 5
(−146) mod 5 =
2.Easy
Find 193 mod 7, the remainder r with 0 ≤ r < 7.
a = 193n = 7
193 mod 7 =
3.Medium
Find Euler’s totient φ(475), the number of integers from 1 to 475 that are coprime to 475.
n = 475 = 52·19
φ(475) =
4.Medium
Find the inverse of 4 modulo 19: the number x with 0 < x < 19 and 4·x ≡ 1 (mod 19).
a = 4n = 19
4−1 mod 19 =
5.Hard
An RSA key uses the primes p = 17 and q = 37 and the public exponent e = 13. Find the private exponent d (0 < d < φ(n)).
p = 17q = 37e = 13
d =
6.Hard
Solve 16x ≡ 14 (mod 38). Give the smallest positive solution x.
16x ≡ 14 (mod 38)
x =
Answer key
- 1. (−146) mod 5 = 4
- 2. 193 mod 7 = 4
- 3. φ(475) = 360
- 4. 4−1 mod 19 = 5
- 5. d = 133
- 6. x = 8
Full step-by-step solutions: practise this topic on examproblems.com.