Use Euclid’s algorithm to find gcd(531, 459).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 531b = 459
gcd(531, 459) =
2.Easy
Use Euclid’s algorithm to find gcd(92, 66).
a = 92b = 66
gcd(92, 66) =
3.Medium
Find Euler’s totient φ(343), the number of integers from 1 to 343 that are coprime to 343.
n = 343 = 73
φ(343) =
4.Medium
Find Euler’s totient φ(500), the number of integers from 1 to 500 that are coprime to 500.
n = 500 = 22·53
φ(500) =
5.Hard
An RSA key uses p = 17, q = 47 and e = 7. Decrypt the ciphertext c = 80: find the message m.
p = 17q = 47e = 7c = 80
m =
6.Hard
71 is prime. Use Fermat’s little theorem to find 2928007 mod 71.
p = 71k = 28007
2928007 mod 71 =
Answer key
- 1. gcd(531, 459) = 9
- 2. gcd(92, 66) = 2
- 3. φ(343) = 294
- 4. φ(500) = 200
- 5. m = 602
- 6. 2928007 mod 71 = 25
Full step-by-step solutions: practise this topic on examproblems.com.