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
01234mod 5

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

a = −148n = 5
(−148) mod 5 =
2.Easy
012mod 3

Find 359 mod 3, the remainder r with 0 ≤ r < 3.

a = 359n = 3
359 mod 3 =
3.Medium

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

a = 37n = 59
37−1 mod 59 =
4.Medium

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

a = 31n = 43
31−1 mod 43 =
5.Hard

Use repeated squaring to find 65144 mod 92.

a = 65k = 144n = 92
65144 mod 92 =
6.Hard

Solve 30x ≡ 36 (mod 63). Give the smallest positive solution x.

30x ≡ 36 (mod 63)
x =

Answer key

  1. 1. (−148) mod 5 = 2
  2. 2. 359 mod 3 = 2
  3. 3. 37−1 mod 59 = 8
  4. 4. 31−1 mod 43 = 25
  5. 5. 65144 mod 92 = 73
  6. 6. x = 18

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