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
aqbr637=?·416+??=?·?+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(637, 416).

a = 637b = 416
gcd(637, 416) =
2.Easy
aqbr138=?·21+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(138, 21).

a = 138b = 21
gcd(138, 21) =
3.Medium

Solve 11x ≡ 6 (mod 13). Give the solution x with 0 < x < 13.

11x ≡ 6 (mod 13)
x =
4.Medium

Find the smallest positive integer x with x ≡ 6 (mod 9) and x ≡ 2 (mod 13).

x ≡ 6 (mod 9)x ≡ 2 (mod 13)
x =
5.Hard
352c = me​ mod n?m = cd​ mod nm(n, e) = (377, 19)d

Encrypt the message m = 352 with the RSA public key (n, e) = (377, 19). Find the ciphertext c.

n = 377e = 19m = 352
c =
6.Hard

How many solutions N does 26x ≡ 28 (mod 44) have in {0, 1, …, 43}?

26x ≡ 28 (mod 44)
N =

Answer key

  1. 1. gcd(637, 416) = 13
  2. 2. gcd(138, 21) = 3
  3. 3. x = 10
  4. 4. x = 15
  5. 5. c = 183
  6. 6. N = 2

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