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 (−58) mod 11, the remainder r with 0 ≤ r < 11.

a = −58n = 11
(−58) mod 11 =
2.Easy

Find 981² mod 13 without multiplying out the large numbers: reduce first.

n = 13
981² mod 13 =
3.Medium

Find the smallest positive integer x with x ≡ 2 (mod 4) and x ≡ 4 (mod 5).

x ≡ 2 (mod 4)x ≡ 4 (mod 5)
x =
4.Medium

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

a = 74n = 97
74−1 mod 97 =
5.Hard
4c = me​ mod n?m = cd​ mod nm(n, e) = (407, 11)d

Encrypt the message m = 4 with the RSA public key (n, e) = (407, 11). Find the ciphertext c.

n = 407e = 11m = 4
c =
6.Hard

How many solutions N does 4x ≡ 12 (mod 14) have in {0, 1, …, 13}?

4x ≡ 12 (mod 14)
N =

Answer key

  1. 1. (−58) mod 11 = 8
  2. 2. 981² mod 13 = 10
  3. 3. x = 14
  4. 4. 74−1 mod 97 = 59
  5. 5. c = 169
  6. 6. N = 2

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