Use Euclid’s algorithm to find gcd(221, 182).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 221b = 182
gcd(221, 182) =
2.Easy
Find (986·207) mod 13 without multiplying out the large numbers: reduce first.
n = 13
(986·207) mod 13 =
3.Medium
Find the inverse of 13 modulo 34: the number x with 0 < x < 34 and 13·x ≡ 1 (mod 34).
a = 13n = 34
13−1 mod 34 =
4.Medium
Find Euler’s totient φ(171), the number of integers from 1 to 171 that are coprime to 171.
n = 171 = 32·19
φ(171) =
5.Hard
Solve 26x ≡ 22 (mod 74). Give the smallest positive solution x.
26x ≡ 22 (mod 74)
x =
6.Hard
Use repeated squaring to find 6101 mod 11.
a = 6k = 101n = 11
6101 mod 11 =
Answer key
- 1. gcd(221, 182) = 13
- 2. (986·207) mod 13 = 2
- 3. 13−1 mod 34 = 21
- 4. φ(171) = 108
- 5. x = 35
- 6. 6101 mod 11 = 6
Full step-by-step solutions: practise this topic on examproblems.com.