Use Euclid’s algorithm to find gcd(660, 435).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 660b = 435
gcd(660, 435) =
2.Easy
Find 483 mod 4, the remainder r with 0 ≤ r < 4.
a = 483n = 4
483 mod 4 =
3.Medium
Find Euler’s totient φ(121), the number of integers from 1 to 121 that are coprime to 121.
n = 121 = 112
φ(121) =
4.Medium
Find the inverse of 49 modulo 61: the number x with 0 < x < 61 and 49·x ≡ 1 (mod 61).
a = 49n = 61
49−1 mod 61 =
5.Hard
Use repeated squaring to find 1994 mod 37.
a = 19k = 94n = 37
1994 mod 37 =
6.Hard
29 is prime. Use Fermat’s little theorem to find 2791251 mod 29.
p = 29k = 91251
2791251 mod 29 =
Answer key
- 1. gcd(660, 435) = 15
- 2. 483 mod 4 = 3
- 3. φ(121) = 110
- 4. 49−1 mod 61 = 5
- 5. 1994 mod 37 = 30
- 6. 2791251 mod 29 = 14
Full step-by-step solutions: practise this topic on examproblems.com.