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 (529·265) mod 9 without multiplying out the large numbers: reduce first.

n = 9
(529·265) mod 9 =
2.Easy

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

n = 9
(520·796) mod 9 =
3.Medium

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

a = 15n = 19
15−1 mod 19 =
4.Medium

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

n = 343 = 73
φ(343) =
5.Hard

53 is prime. Use Fermat’s little theorem to find 1640390 mod 53.

p = 53k = 40390
1640390 mod 53 =
6.Hard

11 is prime. Use Fermat’s little theorem to find 2451949 mod 11.

p = 11k = 51949
2451949 mod 11 =

Answer key

  1. 1. (529·265) mod 9 = 1
  2. 2. (520·796) mod 9 = 1
  3. 3. 15−1 mod 19 = 14
  4. 4. φ(343) = 294
  5. 5. 1640390 mod 53 = 10
  6. 6. 2451949 mod 11 = 6

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