Use Euclid’s algorithm to find gcd(140, 48).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 140b = 48
gcd(140, 48) =
2.Easy
Use Euclid’s algorithm to find gcd(315, 99).
a = 315b = 99
gcd(315, 99) =
3.Medium
Find Euler’s totient φ(18), the number of integers from 1 to 18 that are coprime to 18.
n = 18 = 2·32
φ(18) =
4.Medium
Solve 19x ≡ 1 (mod 43). Give the solution x with 0 < x < 43.
19x ≡ 1 (mod 43)
x =
5.Hard
Encrypt the message m = 29 with the RSA public key (n, e) = (391, 13). Find the ciphertext c.
n = 391e = 13m = 29
c =
6.Hard
61 is prime. Use Fermat’s little theorem to find 1646314 mod 61.
p = 61k = 46314
1646314 mod 61 =
Answer key
- 1. gcd(140, 48) = 4
- 2. gcd(315, 99) = 9
- 3. φ(18) = 6
- 4. x = 34
- 5. c = 82
- 6. 1646314 mod 61 = 58
Full step-by-step solutions: practise this topic on examproblems.com.