Find 130 mod 9, the remainder r with 0 ≤ r < 9.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 130n = 9
130 mod 9 =
2.Easy
Find 330² mod 13 without multiplying out the large numbers: reduce first.
n = 13
330² mod 13 =
3.Medium
Find Euler’s totient φ(19), the number of integers from 1 to 19 that are coprime to 19.
n = 19 = 19
φ(19) =
4.Medium
Solve 25x ≡ 37 (mod 67). Give the solution x with 0 < x < 67.
25x ≡ 37 (mod 67)
x =
5.Hard
An RSA key uses the primes p = 19 and q = 37 and the public exponent e = 5. Find the private exponent d (0 < d < φ(n)).
p = 19q = 37e = 5
d =
6.Hard
53 is prime. Use Fermat’s little theorem to find 2285558 mod 53.
p = 53k = 85558
2285558 mod 53 =
Answer key
- 1. 130 mod 9 = 4
- 2. 330² mod 13 = 12
- 3. φ(19) = 18
- 4. x = 39
- 5. d = 389
- 6. 2285558 mod 53 = 43
Full step-by-step solutions: practise this topic on examproblems.com.