Use Euclid’s algorithm to find gcd(697, 408).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 697b = 408
gcd(697, 408) =
2.Easy
Find (−23) mod 7, the remainder r with 0 ≤ r < 7.
a = −23n = 7
(−23) mod 7 =
3.Medium
Solve 39x ≡ 15 (mod 49). Give the solution x with 0 < x < 49.
39x ≡ 15 (mod 49)
x =
4.Medium
Solve 25x ≡ 12 (mod 29). Give the solution x with 0 < x < 29.
25x ≡ 12 (mod 29)
x =
5.Hard
Use repeated squaring to find 1091 mod 49.
a = 10k = 91n = 49
1091 mod 49 =
6.Hard
17 is prime. Use Fermat’s little theorem to find 1568827 mod 17.
p = 17k = 68827
1568827 mod 17 =
Answer key
- 1. gcd(697, 408) = 17
- 2. (−23) mod 7 = 5
- 3. x = 23
- 4. x = 26
- 5. 1091 mod 49 = 31
- 6. 1568827 mod 17 = 9
Full step-by-step solutions: practise this topic on examproblems.com.