Use Euclid’s algorithm to find gcd(62, 8).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 62b = 8
gcd(62, 8) =
2.Easy
Find (560·918 + 11) mod 9 without multiplying out the large numbers: reduce first.
n = 9
(560·918 + 11) mod 9 =
3.Medium
Find the smallest positive integer x with x ≡ 9 (mod 10) and x ≡ 10 (mod 13).
x ≡ 9 (mod 10)x ≡ 10 (mod 13)
x =
4.Medium
Find the inverse of 23 modulo 89: the number x with 0 < x < 89 and 23·x ≡ 1 (mod 89).
a = 23n = 89
23−1 mod 89 =
5.Hard
An RSA key uses p = 5, q = 23 and e = 17. Decrypt the ciphertext c = 54: find the message m.
p = 5q = 23e = 17c = 54
m =
6.Hard
Use repeated squaring to find 1288 mod 37.
a = 12k = 88n = 37
1288 mod 37 =
Answer key
- 1. gcd(62, 8) = 2
- 2. (560·918 + 11) mod 9 = 2
- 3. x = 49
- 4. 23−1 mod 89 = 31
- 5. m = 64
- 6. 1288 mod 37 = 9
Full step-by-step solutions: practise this topic on examproblems.com.