Use Euclid’s algorithm to find gcd(369, 279).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 369b = 279
gcd(369, 279) =
2.Easy
Find (−9) mod 5, the remainder r with 0 ≤ r < 5.
a = −9n = 5
(−9) mod 5 =
3.Medium
Find the inverse of 43 modulo 65: the number x with 0 < x < 65 and 43·x ≡ 1 (mod 65).
a = 43n = 65
43−1 mod 65 =
4.Medium
Find the smallest positive integer x with x ≡ 5 (mod 6) and x ≡ 6 (mod 7).
x ≡ 5 (mod 6)x ≡ 6 (mod 7)
x =
5.Hard
Encrypt the message m = 5 with the RSA public key (n, e) = (119, 19). Find the ciphertext c.
n = 119e = 19m = 5
c =
6.Hard
Use repeated squaring to find 687 mod 41.
a = 6k = 87n = 41
687 mod 41 =
Answer key
- 1. gcd(369, 279) = 9
- 2. (−9) mod 5 = 1
- 3. 43−1 mod 65 = 62
- 4. x = 41
- 5. c = 40
- 6. 687 mod 41 = 29
Full step-by-step solutions: practise this topic on examproblems.com.