Use Euclid’s algorithm to find gcd(392, 184).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 392b = 184
gcd(392, 184) =
2.Easy
Find 119 mod 8, the remainder r with 0 ≤ r < 8.
a = 119n = 8
119 mod 8 =
3.Medium
Solve 38x ≡ 54 (mod 89). Give the solution x with 0 < x < 89.
38x ≡ 54 (mod 89)
x =
4.Medium
Find the smallest positive integer x with x ≡ 3 (mod 7) and x ≡ 2 (mod 11).
x ≡ 3 (mod 7)x ≡ 2 (mod 11)
x =
5.Hard
Encrypt the message m = 453 with the RSA public key (n, e) = (527, 23). Find the ciphertext c.
n = 527e = 23m = 453
c =
6.Hard
37 is prime. Use Fermat’s little theorem to find 125588 mod 37.
p = 37k = 5588
125588 mod 37 =
Answer key
- 1. gcd(392, 184) = 8
- 2. 119 mod 8 = 7
- 3. x = 67
- 4. x = 24
- 5. c = 71
- 6. 125588 mod 37 = 34
Full step-by-step solutions: practise this topic on examproblems.com.