Find (−115) mod 3, the remainder r with 0 ≤ r < 3.
Number theory & modular arithmetic worksheet with answers
1.Easy
a = −115n = 3
(−115) mod 3 =
2.Easy
Use Euclid’s algorithm to find gcd(855, 615).
a = 855b = 615
gcd(855, 615) =
3.Medium
Find Euler’s totient φ(33), the number of integers from 1 to 33 that are coprime to 33.
n = 33 = 3·11
φ(33) =
4.Medium
Find the inverse of 31 modulo 56: the number x with 0 < x < 56 and 31·x ≡ 1 (mod 56).
a = 31n = 56
31−1 mod 56 =
5.Hard
Solve 15x ≡ 65 (mod 80). Give the smallest positive solution x.
15x ≡ 65 (mod 80)
x =
6.Hard
An RSA key uses the primes p = 29 and q = 43 and the public exponent e = 19. Find the private exponent d (0 < d < φ(n)).
p = 29q = 43e = 19
d =
Answer key
- 1. (−115) mod 3 = 2
- 2. gcd(855, 615) = 15
- 3. φ(33) = 20
- 4. 31−1 mod 56 = 47
- 5. x = 15
- 6. d = 619
Full step-by-step solutions: practise this topic on examproblems.com.