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

Find 328² mod 13 without multiplying out the large numbers: reduce first.

n = 13
328² mod 13 =
2.Easy
aqbr720=?·264+??=?·?+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(720, 264).

a = 720b = 264
gcd(720, 264) =
3.Medium

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

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

Solve 13x ≡ 17 (mod 21). Give the solution x with 0 < x < 21.

13x ≡ 17 (mod 21)
x =
5.Hard

23 is prime. Use Fermat’s little theorem to find 2122957 mod 23.

p = 23k = 22957
2122957 mod 23 =
6.Hard

How many solutions N does 12x ≡ 28 (mod 46) have in {0, 1, …, 45}?

12x ≡ 28 (mod 46)
N =

Answer key

  1. 1. 328² mod 13 = 9
  2. 2. gcd(720, 264) = 24
  3. 3. x = 16
  4. 4. x = 11
  5. 5. 2122957 mod 23 = 22
  6. 6. N = 2

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