Use Euclid’s algorithm to find gcd(159, 102).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 159b = 102
gcd(159, 102) =
2.Easy
Find the least common multiple lcm(176, 60). Use Euclid’s algorithm for the gcd first.
a = 176b = 60
lcm(176, 60) =
3.Medium
Solve 26x ≡ 33 (mod 43). Give the solution x with 0 < x < 43.
26x ≡ 33 (mod 43)
x =
4.Medium
Find Euler’s totient φ(323), the number of integers from 1 to 323 that are coprime to 323.
n = 323 = 17·19
φ(323) =
5.Hard
11 is prime. Use Fermat’s little theorem to find 285172 mod 11.
p = 11k = 85172
285172 mod 11 =
6.Hard
An RSA key uses the primes p = 23 and q = 41 and the public exponent e = 7. Find the private exponent d (0 < d < φ(n)).
p = 23q = 41e = 7
d =
Answer key
- 1. gcd(159, 102) = 3
- 2. lcm(176, 60) = 2640
- 3. x = 36
- 4. φ(323) = 288
- 5. 285172 mod 11 = 4
- 6. d = 503
Full step-by-step solutions: practise this topic on examproblems.com.