Find (−11) mod 7, the remainder r with 0 ≤ r < 7.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −11n = 7
(−11) mod 7 =
2.Easy
Use Euclid’s algorithm to find gcd(748, 255).
a = 748b = 255
gcd(748, 255) =
3.Medium
Find Euler’s totient φ(121), the number of integers from 1 to 121 that are coprime to 121.
n = 121 = 112
φ(121) =
4.Medium
Find the inverse of 33 modulo 62: the number x with 0 < x < 62 and 33·x ≡ 1 (mod 62).
a = 33n = 62
33−1 mod 62 =
5.Hard
An RSA key uses the primes p = 13 and q = 43 and the public exponent e = 5. Find the private exponent d (0 < d < φ(n)).
p = 13q = 43e = 5
d =
6.Hard
An RSA key uses the primes p = 5 and q = 19 and the public exponent e = 5. Find the private exponent d (0 < d < φ(n)).
p = 5q = 19e = 5
d =
Answer key
- 1. (−11) mod 7 = 3
- 2. gcd(748, 255) = 17
- 3. φ(121) = 110
- 4. 33−1 mod 62 = 47
- 5. d = 101
- 6. d = 29
Full step-by-step solutions: practise this topic on examproblems.com.