Find 758² mod 9 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 9
758² mod 9 =
2.Easy
Find (−103) mod 10, the remainder r with 0 ≤ r < 10.
a = −103n = 10
(−103) mod 10 =
3.Medium
Find Euler’s totient φ(875), the number of integers from 1 to 875 that are coprime to 875.
n = 875 = 53·7
φ(875) =
4.Medium
Find the inverse of 31 modulo 59: the number x with 0 < x < 59 and 31·x ≡ 1 (mod 59).
a = 31n = 59
31−1 mod 59 =
5.Hard
An RSA key uses the primes p = 5 and q = 23 and the public exponent e = 3. Find the private exponent d (0 < d < φ(n)).
p = 5q = 23e = 3
d =
6.Hard
19 is prime. Use Fermat’s little theorem to find 442540 mod 19.
p = 19k = 42540
442540 mod 19 =
Answer key
- 1. 758² mod 9 = 4
- 2. (−103) mod 10 = 7
- 3. φ(875) = 600
- 4. 31−1 mod 59 = 40
- 5. d = 59
- 6. 442540 mod 19 = 11
Full step-by-step solutions: practise this topic on examproblems.com.