Find (−138) mod 11, the remainder r with 0 ≤ r < 11.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −138n = 11
(−138) mod 11 =
2.Easy
Find 473 mod 6, the remainder r with 0 ≤ r < 6.
a = 473n = 6
473 mod 6 =
3.Medium
Find Euler’s totient φ(26), the number of integers from 1 to 26 that are coprime to 26.
n = 26 = 2·13
φ(26) =
4.Medium
Find the inverse of 5 modulo 29: the number x with 0 < x < 29 and 5·x ≡ 1 (mod 29).
a = 5n = 29
5−1 mod 29 =
5.Hard
43 is prime. Use Fermat’s little theorem to find 1113250 mod 43.
p = 43k = 13250
1113250 mod 43 =
6.Hard
41 is prime. Use Fermat’s little theorem to find 739727 mod 41.
p = 41k = 39727
739727 mod 41 =
Answer key
- 1. (−138) mod 11 = 5
- 2. 473 mod 6 = 5
- 3. φ(26) = 12
- 4. 5−1 mod 29 = 6
- 5. 1113250 mod 43 = 4
- 6. 739727 mod 41 = 17
Full step-by-step solutions: practise this topic on examproblems.com.