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
aqbr374=?·85+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(374, 85).

a = 374b = 85
gcd(374, 85) =
2.Easy

Find (514·966) mod 9 without multiplying out the large numbers: reduce first.

n = 9
(514·966) mod 9 =
3.Medium

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

n = 1445 = 5·172
φ(1445) =
4.Medium

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

a = 28n = 61
28−1 mod 61 =
5.Hard

How many solutions N does 12x ≡ 6 (mod 15) have in {0, 1, …, 14}?

12x ≡ 6 (mod 15)
N =
6.Hard

Solve 12x ≡ 10 (mod 14). Give the smallest positive solution x.

12x ≡ 10 (mod 14)
x =

Answer key

  1. 1. gcd(374, 85) = 17
  2. 2. (514·966) mod 9 = 3
  3. 3. φ(1445) = 1088
  4. 4. 28−1 mod 61 = 24
  5. 5. N = 3
  6. 6. x = 2

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