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 (717·412 + 322) mod 5 without multiplying out the large numbers: reduce first.

n = 5
(717·412 + 322) mod 5 =
2.Easy

Find (859·519 + 138) mod 7 without multiplying out the large numbers: reduce first.

n = 7
(859·519 + 138) mod 7 =
3.Medium

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

a = 52n = 57
52−1 mod 57 =
4.Medium

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

a = 31n = 33
31−1 mod 33 =
5.Hard

73 is prime. Use Fermat’s little theorem to find 310748 mod 73.

p = 73k = 10748
310748 mod 73 =
6.Hard

89 is prime. Use Fermat’s little theorem to find 542532 mod 89.

p = 89k = 42532
542532 mod 89 =

Answer key

  1. 1. (717·412 + 322) mod 5 = 1
  2. 2. (859·519 + 138) mod 7 = 3
  3. 3. 52−1 mod 57 = 34
  4. 4. 31−1 mod 33 = 16
  5. 5. 310748 mod 73 = 64
  6. 6. 542532 mod 89 = 39

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