Find the least common multiple lcm(148, 124). Use Euclid’s algorithm for the gcd first.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 148b = 124
lcm(148, 124) =
2.Easy
Use Euclid’s algorithm to find gcd(522, 99).
a = 522b = 99
gcd(522, 99) =
3.Medium
Find the inverse of 39 modulo 58: the number x with 0 < x < 58 and 39·x ≡ 1 (mod 58).
a = 39n = 58
39−1 mod 58 =
4.Medium
Find Euler’s totient φ(539), the number of integers from 1 to 539 that are coprime to 539.
n = 539 = 72·11
φ(539) =
5.Hard
Use repeated squaring to find 19109 mod 27.
a = 19k = 109n = 27
19109 mod 27 =
6.Hard
An RSA key uses p = 7, q = 11 and e = 23. Decrypt the ciphertext c = 16: find the message m.
p = 7q = 11e = 23c = 16
m =
Answer key
- 1. lcm(148, 124) = 4588
- 2. gcd(522, 99) = 9
- 3. 39−1 mod 58 = 3
- 4. φ(539) = 420
- 5. 19109 mod 27 = 19
- 6. m = 25
Full step-by-step solutions: practise this topic on examproblems.com.