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

n = 7
(877·841) mod 7 =
2.Easy
aqbr59=?·50+??=?·?+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(59, 50).

a = 59b = 50
gcd(59, 50) =
3.Medium

Find the smallest positive integer x with x ≡ 1 (mod 4) and x ≡ 6 (mod 11).

x ≡ 1 (mod 4)x ≡ 6 (mod 11)
x =
4.Medium

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

a = 10n = 93
10−1 mod 93 =
5.Hard

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

p = 89k = 37594
2037594 mod 89 =
6.Hard

Use repeated squaring to find 494 mod 37.

a = 4k = 94n = 37
494 mod 37 =

Answer key

  1. 1. (877·841) mod 7 = 2
  2. 2. gcd(59, 50) = 1
  3. 3. x = 17
  4. 4. 10−1 mod 93 = 28
  5. 5. 2037594 mod 89 = 85
  6. 6. 494 mod 37 = 34

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