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
aqbr708=?·144+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(708, 144).

a = 708b = 144
gcd(708, 144) =
2.Easy
aqbr810=?·375+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(810, 375).

a = 810b = 375
gcd(810, 375) =
3.Medium

Find the smallest positive integer x with x ≡ 6 (mod 7) and x ≡ 4 (mod 10).

x ≡ 6 (mod 7)x ≡ 4 (mod 10)
x =
4.Medium

Solve 39x ≡ 69 (mod 97). Give the solution x with 0 < x < 97.

39x ≡ 69 (mod 97)
x =
5.Hard
mc = me​ mod n48m = cd​ mod n?(n, e) = (559, 5)d

An RSA key uses p = 13, q = 43 and e = 5. Decrypt the ciphertext c = 48: find the message m.

p = 13q = 43e = 5c = 48
m =
6.Hard

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

42x ≡ 18 (mod 44)
N =

Answer key

  1. 1. gcd(708, 144) = 12
  2. 2. gcd(810, 375) = 15
  3. 3. x = 34
  4. 4. x = 54
  5. 5. m = 458
  6. 6. N = 2

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