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
012345mod 6

Find 705 mod 6, the remainder r with 0 ≤ r < 6.

a = 705n = 6
705 mod 6 =
2.Easy

Find (820·765 + 280) mod 6 without multiplying out the large numbers: reduce first.

n = 6
(820·765 + 280) mod 6 =
3.Medium

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

a = 10n = 47
10−1 mod 47 =
4.Medium

Solve 26x ≡ 47 (mod 57). Give the solution x with 0 < x < 57.

26x ≡ 47 (mod 57)
x =
5.Hard
mc = me​ mod n20m = cd​ mod n?(n, e) = (287, 19)d

An RSA key uses p = 7, q = 41 and e = 19. Decrypt the ciphertext c = 20: find the message m.

p = 7q = 41e = 19c = 20
m =
6.Hard
mc = me​ mod n353m = cd​ mod n?(n, e) = (817, 11)d

An RSA key uses p = 19, q = 43 and e = 11. Decrypt the ciphertext c = 353: find the message m.

p = 19q = 43e = 11c = 353
m =

Answer key

  1. 1. 705 mod 6 = 3
  2. 2. (820·765 + 280) mod 6 = 4
  3. 3. 10−1 mod 47 = 33
  4. 4. x = 4
  5. 5. m = 244
  6. 6. m = 425

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