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
aqbr92=?·58+??=?·?+??=?·?+??=?·?+??=?·?+??=?·?+?

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

a = 92b = 58
lcm(92, 58) =
2.Easy
aqbr1008=?·702+??=?·?+??=?·?+??=?·?+??=?·?+?

Use Euclid’s algorithm to find gcd(1008, 702).

a = 1008b = 702
gcd(1008, 702) =
3.Medium

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

n = 484 = 22·112
φ(484) =
4.Medium

Find the smallest positive integer x with x ≡ 1 (mod 3) and x ≡ 2 (mod 7).

x ≡ 1 (mod 3)x ≡ 2 (mod 7)
x =
5.Hard

43 is prime. Use Fermat’s little theorem to find 1724471 mod 43.

p = 43k = 24471
1724471 mod 43 =
6.Hard
mc = me​ mod ncm = cd​ mod nm(n, e) = (253, 17)d = ?

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

p = 11q = 23e = 17
d =

Answer key

  1. 1. lcm(92, 58) = 2668
  2. 2. gcd(1008, 702) = 18
  3. 3. φ(484) = 220
  4. 4. x = 16
  5. 5. 1724471 mod 43 = 35
  6. 6. d = 13

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