Use Euclid’s algorithm to find gcd(585, 255).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 585b = 255
gcd(585, 255) =
2.Easy
Find (−18) mod 7, the remainder r with 0 ≤ r < 7.
a = −18n = 7
(−18) mod 7 =
3.Medium
Find Euler’s totient φ(363), the number of integers from 1 to 363 that are coprime to 363.
n = 363 = 3·112
φ(363) =
4.Medium
Solve 47x ≡ 70 (mod 77). Give the solution x with 0 < x < 77.
47x ≡ 70 (mod 77)
x =
5.Hard
Encrypt the message m = 225 with the RSA public key (n, e) = (319, 3). Find the ciphertext c.
n = 319e = 3m = 225
c =
6.Hard
Use repeated squaring to find 2967 mod 80.
a = 29k = 67n = 80
2967 mod 80 =
Answer key
- 1. gcd(585, 255) = 15
- 2. (−18) mod 7 = 3
- 3. φ(363) = 220
- 4. x = 49
- 5. c = 92
- 6. 2967 mod 80 = 69
Full step-by-step solutions: practise this topic on examproblems.com.