Find 61 mod 6, the remainder r with 0 ≤ r < 6.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 61n = 6
61 mod 6 =
2.Easy
Find the least common multiple lcm(228, 192). Use Euclid’s algorithm for the gcd first.
a = 228b = 192
lcm(228, 192) =
3.Medium
Find the inverse of 19 modulo 23: the number x with 0 < x < 23 and 19·x ≡ 1 (mod 23).
a = 19n = 23
19−1 mod 23 =
4.Medium
Find Euler’s totient φ(119), the number of integers from 1 to 119 that are coprime to 119.
n = 119 = 7·17
φ(119) =
5.Hard
89 is prime. Use Fermat’s little theorem to find 268516 mod 89.
p = 89k = 8516
268516 mod 89 =
6.Hard
An RSA key uses the primes p = 5 and q = 13 and the public exponent e = 19. Find the private exponent d (0 < d < φ(n)).
p = 5q = 13e = 19
d =
Answer key
- 1. 61 mod 6 = 1
- 2. lcm(228, 192) = 3648
- 3. 19−1 mod 23 = 17
- 4. φ(119) = 96
- 5. 268516 mod 89 = 22
- 6. d = 43
Full step-by-step solutions: practise this topic on examproblems.com.