Find (268·821 + 92) mod 13 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 13
(268·821 + 92) mod 13 =
2.Easy
Find the least common multiple lcm(954, 720). Use Euclid’s algorithm for the gcd first.
a = 954b = 720
lcm(954, 720) =
3.Medium
Find the inverse of 39 modulo 97: the number x with 0 < x < 97 and 39·x ≡ 1 (mod 97).
a = 39n = 97
39−1 mod 97 =
4.Medium
Find the inverse of 26 modulo 59: the number x with 0 < x < 59 and 26·x ≡ 1 (mod 59).
a = 26n = 59
26−1 mod 59 =
5.Hard
Use repeated squaring to find 8122 mod 13.
a = 8k = 122n = 13
8122 mod 13 =
6.Hard
An RSA key uses p = 7, q = 13 and e = 7. Decrypt the ciphertext c = 6: find the message m.
p = 7q = 13e = 7c = 6
m =
Answer key
- 1. (268·821 + 92) mod 13 = 4
- 2. lcm(954, 720) = 38160
- 3. 39−1 mod 97 = 5
- 4. 26−1 mod 59 = 25
- 5. 8122 mod 13 = 12
- 6. m = 20
Full step-by-step solutions: practise this topic on examproblems.com.