Use Euclid’s algorithm to find gcd(1044, 558).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 1044b = 558
gcd(1044, 558) =
2.Easy
Find (58·432) mod 10 without multiplying out the large numbers: reduce first.
n = 10
(58·432) mod 10 =
3.Medium
Find the smallest positive integer x with x ≡ 6 (mod 7) and x ≡ 3 (mod 10).
x ≡ 6 (mod 7)x ≡ 3 (mod 10)
x =
4.Medium
Find Euler’s totient φ(343), the number of integers from 1 to 343 that are coprime to 343.
n = 343 = 73
φ(343) =
5.Hard
Use repeated squaring to find 13180 mod 97.
a = 13k = 180n = 97
13180 mod 97 =
6.Hard
Encrypt the message m = 90 with the RSA public key (n, e) = (247, 7). Find the ciphertext c.
n = 247e = 7m = 90
c =
Answer key
- 1. gcd(1044, 558) = 18
- 2. (58·432) mod 10 = 6
- 3. x = 13
- 4. φ(343) = 294
- 5. 13180 mod 97 = 47
- 6. c = 155
Full step-by-step solutions: practise this topic on examproblems.com.