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
aqbr221=?·182+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(221, 182).

a = 221b = 182
gcd(221, 182) =
2.Easy

Find (986·207) mod 13 without multiplying out the large numbers: reduce first.

n = 13
(986·207) mod 13 =
3.Medium

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

a = 13n = 34
13−1 mod 34 =
4.Medium

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

n = 171 = 32·19
φ(171) =
5.Hard

Solve 26x ≡ 22 (mod 74). Give the smallest positive solution x.

26x ≡ 22 (mod 74)
x =
6.Hard

Use repeated squaring to find 6101 mod 11.

a = 6k = 101n = 11
6101 mod 11 =

Answer key

  1. 1. gcd(221, 182) = 13
  2. 2. (986·207) mod 13 = 2
  3. 3. 13−1 mod 34 = 21
  4. 4. φ(171) = 108
  5. 5. x = 35
  6. 6. 6101 mod 11 = 6

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