Find the least common multiple lcm(522, 153). Use Euclid’s algorithm for the gcd first.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 522b = 153
lcm(522, 153) =
2.Easy
Use Euclid’s algorithm to find gcd(184, 148).
a = 184b = 148
gcd(184, 148) =
3.Medium
Find Euler’s totient φ(38), the number of integers from 1 to 38 that are coprime to 38.
n = 38 = 2·19
φ(38) =
4.Medium
Find the inverse of 37 modulo 79: the number x with 0 < x < 79 and 37·x ≡ 1 (mod 79).
a = 37n = 79
37−1 mod 79 =
5.Hard
Solve 30x ≡ 42 (mod 84). Give the smallest positive solution x.
30x ≡ 42 (mod 84)
x =
6.Hard
An RSA key uses p = 13, q = 19 and e = 11. Decrypt the ciphertext c = 112: find the message m.
p = 13q = 19e = 11c = 112
m =
Answer key
- 1. lcm(522, 153) = 8874
- 2. gcd(184, 148) = 4
- 3. φ(38) = 18
- 4. 37−1 mod 79 = 47
- 5. x = 7
- 6. m = 44
Full step-by-step solutions: practise this topic on examproblems.com.