Use Euclid’s algorithm to find gcd(312, 143).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 312b = 143
gcd(312, 143) =
2.Easy
Find 84 mod 10, the remainder r with 0 ≤ r < 10.
a = 84n = 10
84 mod 10 =
3.Medium
Find the inverse of 29 modulo 81: the number x with 0 < x < 81 and 29·x ≡ 1 (mod 81).
a = 29n = 81
29−1 mod 81 =
4.Medium
Solve 10x ≡ 25 (mod 47). Give the solution x with 0 < x < 47.
10x ≡ 25 (mod 47)
x =
5.Hard
Use repeated squaring to find 59175 mod 81.
a = 59k = 175n = 81
59175 mod 81 =
6.Hard
Encrypt the message m = 138 with the RSA public key (n, e) = (731, 5). Find the ciphertext c.
n = 731e = 5m = 138
c =
Answer key
- 1. gcd(312, 143) = 13
- 2. 84 mod 10 = 4
- 3. 29−1 mod 81 = 14
- 4. x = 26
- 5. 59175 mod 81 = 50
- 6. c = 440
Full step-by-step solutions: practise this topic on examproblems.com.