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
aqbr186=?·162+??=?·?+??=?·?+??=?·?+?

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

a = 186b = 162
lcm(186, 162) =
2.Easy
aqbr525=?·483+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(525, 483).

a = 525b = 483
gcd(525, 483) =
3.Medium

Find the smallest positive integer x with x ≡ 1 (mod 3) and x ≡ 5 (mod 13).

x ≡ 1 (mod 3)x ≡ 5 (mod 13)
x =
4.Medium

Solve 92x ≡ 57 (mod 97). Give the solution x with 0 < x < 97.

92x ≡ 57 (mod 97)
x =
5.Hard
mc = me​ mod ncm = cd​ mod nm(n, e) = (407, 23)d = ?

An RSA key uses the primes p = 11 and q = 37 and the public exponent e = 23. Find the private exponent d (0 < d < φ(n)).

p = 11q = 37e = 23
d =
6.Hard

Use repeated squaring to find 3140 mod 31.

a = 3k = 140n = 31
3140 mod 31 =

Answer key

  1. 1. lcm(186, 162) = 5022
  2. 2. gcd(525, 483) = 21
  3. 3. x = 31
  4. 4. x = 8
  5. 5. d = 47
  6. 6. 3140 mod 31 = 5

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