Find (42·82 + 249) mod 6 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 6
(42·82 + 249) mod 6 =
2.Easy
Find (−65) mod 7, the remainder r with 0 ≤ r < 7.
a = −65n = 7
(−65) mod 7 =
3.Medium
Find the smallest positive integer x with x ≡ 2 (mod 3) and x ≡ 6 (mod 7).
x ≡ 2 (mod 3)x ≡ 6 (mod 7)
x =
4.Medium
Find Euler’s totient φ(104), the number of integers from 1 to 104 that are coprime to 104.
n = 104 = 23·13
φ(104) =
5.Hard
71 is prime. Use Fermat’s little theorem to find 1841606 mod 71.
p = 71k = 41606
1841606 mod 71 =
6.Hard
An RSA key uses p = 13, q = 43 and e = 13. Decrypt the ciphertext c = 398: find the message m.
p = 13q = 43e = 13c = 398
m =
Answer key
- 1. (42·82 + 249) mod 6 = 3
- 2. (−65) mod 7 = 5
- 3. x = 20
- 4. φ(104) = 48
- 5. 1841606 mod 71 = 12
- 6. m = 47
Full step-by-step solutions: practise this topic on examproblems.com.