Use Euclid’s algorithm to find gcd(279, 261).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 279b = 261
gcd(279, 261) =
2.Easy
Find (−69) mod 7, the remainder r with 0 ≤ r < 7.
a = −69n = 7
(−69) mod 7 =
3.Medium
Find Euler’s totient φ(85), the number of integers from 1 to 85 that are coprime to 85.
n = 85 = 5·17
φ(85) =
4.Medium
Find the inverse of 61 modulo 79: the number x with 0 < x < 79 and 61·x ≡ 1 (mod 79).
a = 61n = 79
61−1 mod 79 =
5.Hard
Use repeated squaring to find 29199 mod 96.
a = 29k = 199n = 96
29199 mod 96 =
6.Hard
An RSA key uses the primes p = 13 and q = 31 and the public exponent e = 17. Find the private exponent d (0 < d < φ(n)).
p = 13q = 31e = 17
d =
Answer key
- 1. gcd(279, 261) = 9
- 2. (−69) mod 7 = 1
- 3. φ(85) = 64
- 4. 61−1 mod 79 = 57
- 5. 29199 mod 96 = 53
- 6. d = 233
Full step-by-step solutions: practise this topic on examproblems.com.