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

Find (356·759) mod 5 without multiplying out the large numbers: reduce first.

n = 5
(356·759) mod 5 =
2.Easy
01234mod 5

Find (−82) mod 5, the remainder r with 0 ≤ r < 5.

a = −82n = 5
(−82) mod 5 =
3.Medium

Find the inverse of 17 modulo 43: the number x with 0 < x < 43 and 17·x ≡ 1 (mod 43).

a = 17n = 43
17−1 mod 43 =
4.Medium

Find the inverse of 12 modulo 17: the number x with 0 < x < 17 and 12·x ≡ 1 (mod 17).

a = 12n = 17
12−1 mod 17 =
5.Hard

Use repeated squaring to find 8932 mod 91.

a = 89k = 32n = 91
8932 mod 91 =
6.Hard

83 is prime. Use Fermat’s little theorem to find 779960 mod 83.

p = 83k = 79960
779960 mod 83 =

Answer key

  1. 1. (356·759) mod 5 = 4
  2. 2. (−82) mod 5 = 3
  3. 3. 17−1 mod 43 = 38
  4. 4. 12−1 mod 17 = 10
  5. 5. 8932 mod 91 = 74
  6. 6. 779960 mod 83 = 21

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