Find (−75) mod 10, the remainder r with 0 ≤ r < 10.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −75n = 10
(−75) mod 10 =
2.Easy
Use Euclid’s algorithm to find gcd(522, 180).
a = 522b = 180
gcd(522, 180) =
3.Medium
Solve 8x ≡ 6 (mod 47). Give the solution x with 0 < x < 47.
8x ≡ 6 (mod 47)
x =
4.Medium
Find the inverse of 10 modulo 13: the number x with 0 < x < 13 and 10·x ≡ 1 (mod 13).
a = 10n = 13
10−1 mod 13 =
5.Hard
89 is prime. Use Fermat’s little theorem to find 688845 mod 89.
p = 89k = 88845
688845 mod 89 =
6.Hard
Encrypt the message m = 335 with the RSA public key (n, e) = (341, 23). Find the ciphertext c.
n = 341e = 23m = 335
c =
Answer key
- 1. (−75) mod 10 = 5
- 2. gcd(522, 180) = 18
- 3. x = 36
- 4. 10−1 mod 13 = 4
- 5. 688845 mod 89 = 41
- 6. c = 191
Full step-by-step solutions: practise this topic on examproblems.com.