Use Euclid’s algorithm to find gcd(216, 32).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 216b = 32
gcd(216, 32) =
2.Easy
Find 495 mod 7, the remainder r with 0 ≤ r < 7.
a = 495n = 7
495 mod 7 =
3.Medium
Solve 46x ≡ 68 (mod 97). Give the solution x with 0 < x < 97.
46x ≡ 68 (mod 97)
x =
4.Medium
Find the inverse of 59 modulo 80: the number x with 0 < x < 80 and 59·x ≡ 1 (mod 80).
a = 59n = 80
59−1 mod 80 =
5.Hard
Encrypt the message m = 386 with the RSA public key (n, e) = (517, 11). Find the ciphertext c.
n = 517e = 11m = 386
c =
6.Hard
How many solutions N does 21x ≡ 27 (mod 30) have in {0, 1, …, 29}?
21x ≡ 27 (mod 30)
N =
Answer key
- 1. gcd(216, 32) = 8
- 2. 495 mod 7 = 5
- 3. x = 31
- 4. 59−1 mod 80 = 19
- 5. c = 210
- 6. N = 3
Full step-by-step solutions: practise this topic on examproblems.com.