Find the least common multiple lcm(240, 114). Use Euclid’s algorithm for the gcd first.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 240b = 114
lcm(240, 114) =
2.Easy
Use Euclid’s algorithm to find gcd(259, 238).
a = 259b = 238
gcd(259, 238) =
3.Medium
Find the inverse of 27 modulo 31: the number x with 0 < x < 31 and 27·x ≡ 1 (mod 31).
a = 27n = 31
27−1 mod 31 =
4.Medium
Solve 7x ≡ 25 (mod 34). Give the solution x with 0 < x < 34.
7x ≡ 25 (mod 34)
x =
5.Hard
Solve 54x ≡ 38 (mod 56). Give the smallest positive solution x.
54x ≡ 38 (mod 56)
x =
6.Hard
An RSA key uses p = 13, q = 17 and e = 23. Decrypt the ciphertext c = 27: find the message m.
p = 13q = 17e = 23c = 27
m =
Answer key
- 1. lcm(240, 114) = 4560
- 2. gcd(259, 238) = 7
- 3. 27−1 mod 31 = 23
- 4. x = 23
- 5. x = 9
- 6. m = 209
Full step-by-step solutions: practise this topic on examproblems.com.