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
aqbr275=?·231+??=?·?+??=?·?+?

Find the least common multiple lcm(275, 231). Use Euclid’s algorithm for the gcd first.

a = 275b = 231
lcm(275, 231) =
2.Easy
aqbr486=?·99+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(486, 99).

a = 486b = 99
gcd(486, 99) =
3.Medium

Solve 45x ≡ 17 (mod 53). Give the solution x with 0 < x < 53.

45x ≡ 17 (mod 53)
x =
4.Medium

Find the smallest positive integer x with x ≡ 1 (mod 9) and x ≡ 4 (mod 13).

x ≡ 1 (mod 9)x ≡ 4 (mod 13)
x =
5.Hard
196c = me​ mod n?m = cd​ mod nm(n, e) = (391, 13)d

Encrypt the message m = 196 with the RSA public key (n, e) = (391, 13). Find the ciphertext c.

n = 391e = 13m = 196
c =
6.Hard

Use repeated squaring to find 2186 mod 41.

a = 2k = 186n = 41
2186 mod 41 =

Answer key

  1. 1. lcm(275, 231) = 5775
  2. 2. gcd(486, 99) = 9
  3. 3. x = 31
  4. 4. x = 82
  5. 5. c = 144
  6. 6. 2186 mod 41 = 23

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