Find the least common multiple lcm(689, 39). Use Euclid’s algorithm for the gcd first.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 689b = 39
lcm(689, 39) =
2.Easy
Use Euclid’s algorithm to find gcd(774, 234).
a = 774b = 234
gcd(774, 234) =
3.Medium
Solve 20x ≡ 37 (mod 49). Give the solution x with 0 < x < 49.
20x ≡ 37 (mod 49)
x =
4.Medium
Find Euler’s totient φ(14), the number of integers from 1 to 14 that are coprime to 14.
n = 14 = 2·7
φ(14) =
5.Hard
An RSA key uses p = 7, q = 29 and e = 11. Decrypt the ciphertext c = 167: find the message m.
p = 7q = 29e = 11c = 167
m =
6.Hard
97 is prime. Use Fermat’s little theorem to find 1439770 mod 97.
p = 97k = 39770
1439770 mod 97 =
Answer key
- 1. lcm(689, 39) = 2067
- 2. gcd(774, 234) = 18
- 3. x = 19
- 4. φ(14) = 6
- 5. m = 125
- 6. 1439770 mod 97 = 44
Full step-by-step solutions: practise this topic on examproblems.com.