Number theory & modular arithmetic worksheet with answers

Free printable Number theory & modular arithmetic worksheet: 6 problems from easy to exam level, with an answer key. Print it or save it as a PDF.

For teachers: free to print, copy and use in class. Every new worksheet has new values and its own answer key. A link to ExamProblems on your course page is appreciated.

Name: ____________________   Date: ____________

1.Easy
012345678910mod 11

Find (−138) mod 11, the remainder r with 0 ≤ r < 11.

a = −138n = 11
(−138) mod 11 =
2.Easy
012345mod 6

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. 1. (−138) mod 11 = 5
  2. 2. 473 mod 6 = 5
  3. 3. φ(26) = 12
  4. 4. 5−1 mod 29 = 6
  5. 5. 1113250 mod 43 = 4
  6. 6. 739727 mod 41 = 17

Full step-by-step solutions: practise this topic on examproblems.com.