Use Euclid’s algorithm to find gcd(1155, 756).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 1155b = 756
gcd(1155, 756) =
2.Easy
Find (−65) mod 10, the remainder r with 0 ≤ r < 10.
a = −65n = 10
(−65) mod 10 =
3.Medium
Solve 18x ≡ 2 (mod 31). Give the solution x with 0 < x < 31.
18x ≡ 2 (mod 31)
x =
4.Medium
Find Euler’s totient φ(363), the number of integers from 1 to 363 that are coprime to 363.
n = 363 = 3·112
φ(363) =
5.Hard
37 is prime. Use Fermat’s little theorem to find 2395054 mod 37.
p = 37k = 95054
2395054 mod 37 =
6.Hard
An RSA key uses p = 7, q = 11 and e = 23. Decrypt the ciphertext c = 58: find the message m.
p = 7q = 11e = 23c = 58
m =
Answer key
- 1. gcd(1155, 756) = 21
- 2. (−65) mod 10 = 5
- 3. x = 7
- 4. φ(363) = 220
- 5. 2395054 mod 37 = 11
- 6. m = 53
Full step-by-step solutions: practise this topic on examproblems.com.