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
0123456789mod 10

Find 292 mod 10, the remainder r with 0 ≤ r < 10.

a = 292n = 10
292 mod 10 =
2.Easy
aqbr1026=?·360+??=?·?+??=?·?+??=?·?+??=?·?+?

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

a = 1026b = 360
lcm(1026, 360) =
3.Medium

Find the smallest positive integer x with x ≡ 3 (mod 8) and x ≡ 4 (mod 11).

x ≡ 3 (mod 8)x ≡ 4 (mod 11)
x =
4.Medium

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

a = 56n = 73
56−1 mod 73 =
5.Hard

Use repeated squaring to find 50194 mod 69.

a = 50k = 194n = 69
50194 mod 69 =
6.Hard
mc = me​ mod ncm = cd​ mod nm(n, e) = (517, 11)d = ?

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

p = 11q = 47e = 11
d =

Answer key

  1. 1. 292 mod 10 = 2
  2. 2. lcm(1026, 360) = 20520
  3. 3. x = 59
  4. 4. 56−1 mod 73 = 30
  5. 5. 50194 mod 69 = 31
  6. 6. d = 251

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