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
aqbr403=?·377+??=?·?+??=?·?+?

Find the least common multiple lcm(403, 377). Use Euclid’s algorithm for the gcd first.

a = 403b = 377
lcm(403, 377) =
2.Easy
aqbr450=?·345+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(450, 345).

a = 450b = 345
gcd(450, 345) =
3.Medium

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

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

Find the smallest positive integer x with x ≡ 4 (mod 7) and x ≡ 1 (mod 8).

x ≡ 4 (mod 7)x ≡ 1 (mod 8)
x =
5.Hard

31 is prime. Use Fermat’s little theorem to find 1947804 mod 31.

p = 31k = 47804
1947804 mod 31 =
6.Hard

Use repeated squaring to find 2941 mod 32.

a = 29k = 41n = 32
2941 mod 32 =

Answer key

  1. 1. lcm(403, 377) = 11687
  2. 2. gcd(450, 345) = 15
  3. 3. x = 24
  4. 4. x = 25
  5. 5. 1947804 mod 31 = 18
  6. 6. 2941 mod 32 = 29

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