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
aqbr357=?·147+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(357, 147).

a = 357b = 147
gcd(357, 147) =
2.Easy
aqbr900=?·165+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(900, 165).

a = 900b = 165
gcd(900, 165) =
3.Medium

Solve 29x ≡ 30 (mod 47). Give the solution x with 0 < x < 47.

29x ≡ 30 (mod 47)
x =
4.Medium

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

n = 21 = 3·7
φ(21) =
5.Hard

29 is prime. Use Fermat’s little theorem to find 238364 mod 29.

p = 29k = 38364
238364 mod 29 =
6.Hard

How many solutions N does 10x ≡ 50 (mod 54) have in {0, 1, …, 53}?

10x ≡ 50 (mod 54)
N =

Answer key

  1. 1. gcd(357, 147) = 21
  2. 2. gcd(900, 165) = 15
  3. 3. x = 14
  4. 4. φ(21) = 12
  5. 5. 238364 mod 29 = 16
  6. 6. N = 2

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