Use Euclid’s algorithm to find gcd(240, 196).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 240b = 196
gcd(240, 196) =
2.Easy
Find (570·711 + 88) mod 5 without multiplying out the large numbers: reduce first.
n = 5
(570·711 + 88) mod 5 =
3.Medium
Find the smallest positive integer x with x ≡ 4 (mod 8) and x ≡ 8 (mod 13).
x ≡ 4 (mod 8)x ≡ 8 (mod 13)
x =
4.Medium
Find the inverse of 20 modulo 67: the number x with 0 < x < 67 and 20·x ≡ 1 (mod 67).
a = 20n = 67
20−1 mod 67 =
5.Hard
53 is prime. Use Fermat’s little theorem to find 363098 mod 53.
p = 53k = 63098
363098 mod 53 =
6.Hard
73 is prime. Use Fermat’s little theorem to find 1955293 mod 73.
p = 73k = 55293
1955293 mod 73 =
Answer key
- 1. gcd(240, 196) = 4
- 2. (570·711 + 88) mod 5 = 3
- 3. x = 60
- 4. 20−1 mod 67 = 57
- 5. 363098 mod 53 = 17
- 6. 1955293 mod 73 = 24
Full step-by-step solutions: practise this topic on examproblems.com.