Use Euclid’s algorithm to find gcd(495, 300).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 495b = 300
gcd(495, 300) =
2.Easy
Find (113·104) mod 10 without multiplying out the large numbers: reduce first.
n = 10
(113·104) mod 10 =
3.Medium
Find the inverse of 34 modulo 97: the number x with 0 < x < 97 and 34·x ≡ 1 (mod 97).
a = 34n = 97
34−1 mod 97 =
4.Medium
Find the inverse of 49 modulo 73: the number x with 0 < x < 73 and 49·x ≡ 1 (mod 73).
a = 49n = 73
49−1 mod 73 =
5.Hard
Use repeated squaring to find 32167 mod 43.
a = 32k = 167n = 43
32167 mod 43 =
6.Hard
An RSA key uses p = 7, q = 41 and e = 13. Decrypt the ciphertext c = 37: find the message m.
p = 7q = 41e = 13c = 37
m =
Answer key
- 1. gcd(495, 300) = 15
- 2. (113·104) mod 10 = 2
- 3. 34−1 mod 97 = 20
- 4. 49−1 mod 73 = 3
- 5. 32167 mod 43 = 39
- 6. m = 16
Full step-by-step solutions: practise this topic on examproblems.com.