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
01234567891011mod 12

Find (−136) mod 12, the remainder r with 0 ≤ r < 12.

a = −136n = 12
(−136) mod 12 =
2.Easy

Find (758·941 + 352) mod 12 without multiplying out the large numbers: reduce first.

n = 12
(758·941 + 352) mod 12 =
3.Medium

Find the smallest positive integer x with x ≡ 5 (mod 7) and x ≡ 1 (mod 8).

x ≡ 5 (mod 7)x ≡ 1 (mod 8)
x =
4.Medium

Solve 11x ≡ 10 (mod 17). Give the solution x with 0 < x < 17.

11x ≡ 10 (mod 17)
x =
5.Hard

Use repeated squaring to find 37130 mod 54.

a = 37k = 130n = 54
37130 mod 54 =
6.Hard
mc = me​ mod n688m = cd​ mod n?(n, e) = (1271, 17)d

An RSA key uses p = 31, q = 41 and e = 17. Decrypt the ciphertext c = 688: find the message m.

p = 31q = 41e = 17c = 688
m =

Answer key

  1. 1. (−136) mod 12 = 8
  2. 2. (758·941 + 352) mod 12 = 2
  3. 3. x = 33
  4. 4. x = 4
  5. 5. 37130 mod 54 = 37
  6. 6. m = 770

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