Use Euclid’s algorithm to find gcd(180, 141).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 180b = 141
gcd(180, 141) =
2.Easy
Use Euclid’s algorithm to find gcd(870, 405).
a = 870b = 405
gcd(870, 405) =
3.Medium
Find the smallest positive integer x with x ≡ 1 (mod 8) and x ≡ 7 (mod 11).
x ≡ 1 (mod 8)x ≡ 7 (mod 11)
x =
4.Medium
Find the inverse of 22 modulo 31: the number x with 0 < x < 31 and 22·x ≡ 1 (mod 31).
a = 22n = 31
22−1 mod 31 =
5.Hard
An RSA key uses p = 7, q = 17 and e = 11. Decrypt the ciphertext c = 90: find the message m.
p = 7q = 17e = 11c = 90
m =
6.Hard
How many solutions N does 40x ≡ 16 (mod 56) have in {0, 1, …, 55}?
40x ≡ 16 (mod 56)
N =
Answer key
- 1. gcd(180, 141) = 3
- 2. gcd(870, 405) = 15
- 3. x = 73
- 4. 22−1 mod 31 = 24
- 5. m = 6
- 6. N = 8
Full step-by-step solutions: practise this topic on examproblems.com.