Use Euclid’s algorithm to find gcd(516, 288).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 516b = 288
gcd(516, 288) =
2.Easy
Use Euclid’s algorithm to find gcd(391, 357).
a = 391b = 357
gcd(391, 357) =
3.Medium
Solve 21x ≡ 8 (mod 59). Give the solution x with 0 < x < 59.
21x ≡ 8 (mod 59)
x =
4.Medium
Find Euler’s totient φ(169), the number of integers from 1 to 169 that are coprime to 169.
n = 169 = 132
φ(169) =
5.Hard
73 is prime. Use Fermat’s little theorem to find 1153698 mod 73.
p = 73k = 53698
1153698 mod 73 =
6.Hard
An RSA key uses p = 17, q = 37 and e = 7. Decrypt the ciphertext c = 49: find the message m.
p = 17q = 37e = 7c = 49
m =
Answer key
- 1. gcd(516, 288) = 12
- 2. gcd(391, 357) = 17
- 3. x = 6
- 4. φ(169) = 156
- 5. 1153698 mod 73 = 12
- 6. m = 127
Full step-by-step solutions: practise this topic on examproblems.com.