Find 595 mod 4, the remainder r with 0 ≤ r < 4.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 595n = 4
595 mod 4 =
2.Easy
Use Euclid’s algorithm to find gcd(102, 42).
a = 102b = 42
gcd(102, 42) =
3.Medium
Find the inverse of 65 modulo 77: the number x with 0 < x < 77 and 65·x ≡ 1 (mod 77).
a = 65n = 77
65−1 mod 77 =
4.Medium
Solve 14x ≡ 23 (mod 27). Give the solution x with 0 < x < 27.
14x ≡ 23 (mod 27)
x =
5.Hard
Use repeated squaring to find 3670 mod 41.
a = 36k = 70n = 41
3670 mod 41 =
6.Hard
An RSA key uses the primes p = 17 and q = 43 and the public exponent e = 11. Find the private exponent d (0 < d < φ(n)).
p = 17q = 43e = 11
d =
Answer key
- 1. 595 mod 4 = 3
- 2. gcd(102, 42) = 6
- 3. 65−1 mod 77 = 32
- 4. x = 19
- 5. 3670 mod 41 = 40
- 6. d = 611
Full step-by-step solutions: practise this topic on examproblems.com.