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
aqbr1416=?·912+??=?·?+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(1416, 912).

a = 1416b = 912
gcd(1416, 912) =
2.Easy
01234mod 5

Find 298 mod 5, the remainder r with 0 ≤ r < 5.

a = 298n = 5
298 mod 5 =
3.Medium

Find the smallest positive integer x with x ≡ 5 (mod 8) and x ≡ 0 (mod 11).

x ≡ 5 (mod 8)x ≡ 0 (mod 11)
x =
4.Medium

Find the smallest positive integer x with x ≡ 6 (mod 7) and x ≡ 0 (mod 9).

x ≡ 6 (mod 7)x ≡ 0 (mod 9)
x =
5.Hard

Solve 14x ≡ 12 (mod 34). Give the smallest positive solution x.

14x ≡ 12 (mod 34)
x =
6.Hard
mc = me​ mod n107m = cd​ mod n?(n, e) = (403, 11)d

An RSA key uses p = 13, q = 31 and e = 11. Decrypt the ciphertext c = 107: find the message m.

p = 13q = 31e = 11c = 107
m =

Answer key

  1. 1. gcd(1416, 912) = 24
  2. 2. 298 mod 5 = 3
  3. 3. x = 77
  4. 4. x = 27
  5. 5. x = 13
  6. 6. m = 9

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