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
0123mod 4

Find (−102) mod 4, the remainder r with 0 ≤ r < 4.

a = −102n = 4
(−102) mod 4 =
2.Easy

Find (275·288 + 348) mod 8 without multiplying out the large numbers: reduce first.

n = 8
(275·288 + 348) mod 8 =
3.Medium

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

a = 11n = 73
11−1 mod 73 =
4.Medium

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

a = 25n = 28
25−1 mod 28 =
5.Hard
283c = me​ mod n?m = cd​ mod nm(n, e) = (299, 17)d

Encrypt the message m = 283 with the RSA public key (n, e) = (299, 17). Find the ciphertext c.

n = 299e = 17m = 283
c =
6.Hard

Use repeated squaring to find 3436 mod 41.

a = 34k = 36n = 41
3436 mod 41 =

Answer key

  1. 1. (−102) mod 4 = 2
  2. 2. (275·288 + 348) mod 8 = 4
  3. 3. 11−1 mod 73 = 20
  4. 4. 25−1 mod 28 = 9
  5. 5. c = 134
  6. 6. 3436 mod 41 = 25

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