Use Euclid’s algorithm to find gcd(144, 104).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 144b = 104
gcd(144, 104) =
2.Easy
Use Euclid’s algorithm to find gcd(342, 78).
a = 342b = 78
gcd(342, 78) =
3.Medium
Find the smallest positive integer x with x ≡ 1 (mod 7) and x ≡ 0 (mod 11).
x ≡ 1 (mod 7)x ≡ 0 (mod 11)
x =
4.Medium
Find the inverse of 13 modulo 31: the number x with 0 < x < 31 and 13·x ≡ 1 (mod 31).
a = 13n = 31
13−1 mod 31 =
5.Hard
Use repeated squaring to find 1789 mod 62.
a = 17k = 89n = 62
1789 mod 62 =
6.Hard
67 is prime. Use Fermat’s little theorem to find 2378169 mod 67.
p = 67k = 78169
2378169 mod 67 =
Answer key
- 1. gcd(144, 104) = 8
- 2. gcd(342, 78) = 6
- 3. x = 22
- 4. 13−1 mod 31 = 12
- 5. 1789 mod 62 = 11
- 6. 2378169 mod 67 = 6
Full step-by-step solutions: practise this topic on examproblems.com.