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
aqbr94=?·18+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(94, 18).

a = 94b = 18
gcd(94, 18) =
2.Easy

Find 181² mod 8 without multiplying out the large numbers: reduce first.

n = 8
181² mod 8 =
3.Medium

Solve 36x ≡ 61 (mod 79). Give the solution x with 0 < x < 79.

36x ≡ 61 (mod 79)
x =
4.Medium

Find Euler’s totient φ(875), the number of integers from 1 to 875 that are coprime to 875.

n = 875 = 53·7
φ(875) =
5.Hard

Solve 14x ≡ 38 (mod 74). Give the smallest positive solution x.

14x ≡ 38 (mod 74)
x =
6.Hard

Solve 21x ≡ 60 (mod 69). Give the smallest positive solution x.

21x ≡ 60 (mod 69)
x =

Answer key

  1. 1. gcd(94, 18) = 2
  2. 2. 181² mod 8 = 1
  3. 3. x = 39
  4. 4. φ(875) = 600
  5. 5. x = 8
  6. 6. x = 16

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