Use Euclid’s algorithm to find gcd(1008, 408).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 1008b = 408
gcd(1008, 408) =
2.Easy
Find (−97) mod 7, the remainder r with 0 ≤ r < 7.
a = −97n = 7
(−97) mod 7 =
3.Medium
Solve 36x ≡ 59 (mod 67). Give the solution x with 0 < x < 67.
36x ≡ 59 (mod 67)
x =
4.Medium
Find the smallest positive integer x with x ≡ 1 (mod 3) and x ≡ 5 (mod 8).
x ≡ 1 (mod 3)x ≡ 5 (mod 8)
x =
5.Hard
Use repeated squaring to find 5639 mod 59.
a = 56k = 39n = 59
5639 mod 59 =
6.Hard
73 is prime. Use Fermat’s little theorem to find 2429986 mod 73.
p = 73k = 29986
2429986 mod 73 =
Answer key
- 1. gcd(1008, 408) = 24
- 2. (−97) mod 7 = 1
- 3. x = 37
- 4. x = 13
- 5. 5639 mod 59 = 10
- 6. 2429986 mod 73 = 9
Full step-by-step solutions: practise this topic on examproblems.com.