Find 416² mod 5 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 5
416² mod 5 =
2.Easy
Use Euclid’s algorithm to find gcd(224, 124).
a = 224b = 124
gcd(224, 124) =
3.Medium
Find Euler’s totient φ(34), the number of integers from 1 to 34 that are coprime to 34.
n = 34 = 2·17
φ(34) =
4.Medium
Find the inverse of 19 modulo 83: the number x with 0 < x < 83 and 19·x ≡ 1 (mod 83).
a = 19n = 83
19−1 mod 83 =
5.Hard
An RSA key uses the primes p = 7 and q = 31 and the public exponent e = 17. Find the private exponent d (0 < d < φ(n)).
p = 7q = 31e = 17
d =
6.Hard
An RSA key uses the primes p = 13 and q = 29 and the public exponent e = 13. Find the private exponent d (0 < d < φ(n)).
p = 13q = 29e = 13
d =
Answer key
- 1. 416² mod 5 = 1
- 2. gcd(224, 124) = 4
- 3. φ(34) = 16
- 4. 19−1 mod 83 = 35
- 5. d = 53
- 6. d = 181
Full step-by-step solutions: practise this topic on examproblems.com.