Use Euclid’s algorithm to find gcd(414, 369).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 414b = 369
gcd(414, 369) =
2.Easy
Find 222 mod 8, the remainder r with 0 ≤ r < 8.
a = 222n = 8
222 mod 8 =
3.Medium
Find the smallest positive integer x with x ≡ 4 (mod 7) and x ≡ 0 (mod 13).
x ≡ 4 (mod 7)x ≡ 0 (mod 13)
x =
4.Medium
Find Euler’s totient φ(578), the number of integers from 1 to 578 that are coprime to 578.
n = 578 = 2·172
φ(578) =
5.Hard
Encrypt the message m = 87 with the RSA public key (n, e) = (1081, 13). Find the ciphertext c.
n = 1081e = 13m = 87
c =
6.Hard
Use repeated squaring to find 9136 mod 99.
a = 91k = 36n = 99
9136 mod 99 =
Answer key
- 1. gcd(414, 369) = 9
- 2. 222 mod 8 = 6
- 3. x = 39
- 4. φ(578) = 272
- 5. c = 163
- 6. 9136 mod 99 = 91
Full step-by-step solutions: practise this topic on examproblems.com.