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
aqbr192=?·68+??=?·?+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(192, 68).

a = 192b = 68
gcd(192, 68) =
2.Easy
aqbr527=?·221+??=?·?+??=?·?+??=?·?+??=?·?+?

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

a = 527b = 221
lcm(527, 221) =
3.Medium

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

a = 3n = 23
3−1 mod 23 =
4.Medium

Solve 23x ≡ 12 (mod 67). Give the solution x with 0 < x < 67.

23x ≡ 12 (mod 67)
x =
5.Hard

11 is prime. Use Fermat’s little theorem to find 2735664 mod 11.

p = 11k = 35664
2735664 mod 11 =
6.Hard

Solve 30x ≡ 12 (mod 69). Give the smallest positive solution x.

30x ≡ 12 (mod 69)
x =

Answer key

  1. 1. gcd(192, 68) = 4
  2. 2. lcm(527, 221) = 6851
  3. 3. 3−1 mod 23 = 8
  4. 4. x = 18
  5. 5. 2735664 mod 11 = 9
  6. 6. x = 5

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