Use Euclid’s algorithm to find gcd(754, 637).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 754b = 637
gcd(754, 637) =
2.Easy
Find the least common multiple lcm(1050, 903). Use Euclid’s algorithm for the gcd first.
a = 1050b = 903
lcm(1050, 903) =
3.Medium
Find the inverse of 49 modulo 74: the number x with 0 < x < 74 and 49·x ≡ 1 (mod 74).
a = 49n = 74
49−1 mod 74 =
4.Medium
Find Euler’s totient φ(1183), the number of integers from 1 to 1183 that are coprime to 1183.
n = 1183 = 7·132
φ(1183) =
5.Hard
Use repeated squaring to find 34149 mod 77.
a = 34k = 149n = 77
34149 mod 77 =
6.Hard
89 is prime. Use Fermat’s little theorem to find 259281 mod 89.
p = 89k = 59281
259281 mod 89 =
Answer key
- 1. gcd(754, 637) = 13
- 2. lcm(1050, 903) = 45150
- 3. 49−1 mod 74 = 71
- 4. φ(1183) = 936
- 5. 34149 mod 77 = 34
- 6. 259281 mod 89 = 4
Full step-by-step solutions: practise this topic on examproblems.com.