Use Euclid’s algorithm to find gcd(129, 93).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 129b = 93
gcd(129, 93) =
2.Easy
Use Euclid’s algorithm to find gcd(221, 78).
a = 221b = 78
gcd(221, 78) =
3.Medium
Solve 11x ≡ 56 (mod 74). Give the solution x with 0 < x < 74.
11x ≡ 56 (mod 74)
x =
4.Medium
Find Euler’s totient φ(20), the number of integers from 1 to 20 that are coprime to 20.
n = 20 = 22·5
φ(20) =
5.Hard
An RSA key uses p = 31, q = 41 and e = 17. Decrypt the ciphertext c = 1194: find the message m.
p = 31q = 41e = 17c = 1194
m =
6.Hard
83 is prime. Use Fermat’s little theorem to find 1559722 mod 83.
p = 83k = 59722
1559722 mod 83 =
Answer key
- 1. gcd(129, 93) = 3
- 2. gcd(221, 78) = 13
- 3. x = 32
- 4. φ(20) = 8
- 5. m = 531
- 6. 1559722 mod 83 = 77
Full step-by-step solutions: practise this topic on examproblems.com.