Use Euclid’s algorithm to find gcd(507, 208).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 507b = 208
gcd(507, 208) =
2.Easy
Find (702·528 + 490) mod 9 without multiplying out the large numbers: reduce first.
n = 9
(702·528 + 490) mod 9 =
3.Medium
Find the smallest positive integer x with x ≡ 2 (mod 5) and x ≡ 10 (mod 11).
x ≡ 2 (mod 5)x ≡ 10 (mod 11)
x =
4.Medium
Find the inverse of 71 modulo 83: the number x with 0 < x < 83 and 71·x ≡ 1 (mod 83).
a = 71n = 83
71−1 mod 83 =
5.Hard
Use repeated squaring to find 8119 mod 15.
a = 8k = 119n = 15
8119 mod 15 =
6.Hard
Encrypt the message m = 782 with the RSA public key (n, e) = (817, 19). Find the ciphertext c.
n = 817e = 19m = 782
c =
Answer key
- 1. gcd(507, 208) = 13
- 2. (702·528 + 490) mod 9 = 4
- 3. x = 32
- 4. 71−1 mod 83 = 76
- 5. 8119 mod 15 = 2
- 6. c = 174
Full step-by-step solutions: practise this topic on examproblems.com.