Use Euclid’s algorithm to find gcd(450, 285).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 450b = 285
gcd(450, 285) =
2.Easy
Find (−25) mod 11, the remainder r with 0 ≤ r < 11.
a = −25n = 11
(−25) mod 11 =
3.Medium
Find the inverse of 6 modulo 29: the number x with 0 < x < 29 and 6·x ≡ 1 (mod 29).
a = 6n = 29
6−1 mod 29 =
4.Medium
Find the inverse of 16 modulo 57: the number x with 0 < x < 57 and 16·x ≡ 1 (mod 57).
a = 16n = 57
16−1 mod 57 =
5.Hard
Use repeated squaring to find 6254 mod 69.
a = 62k = 54n = 69
6254 mod 69 =
6.Hard
67 is prime. Use Fermat’s little theorem to find 2295796 mod 67.
p = 67k = 95796
2295796 mod 67 =
Answer key
- 1. gcd(450, 285) = 15
- 2. (−25) mod 11 = 8
- 3. 6−1 mod 29 = 5
- 4. 16−1 mod 57 = 25
- 5. 6254 mod 69 = 13
- 6. 2295796 mod 67 = 40
Full step-by-step solutions: practise this topic on examproblems.com.