Use Euclid’s algorithm to find gcd(406, 42).
Number theory & modular arithmetic worksheet with answers
1.Easy
a = 406b = 42
gcd(406, 42) =
2.Easy
Use Euclid’s algorithm to find gcd(663, 481).
a = 663b = 481
gcd(663, 481) =
3.Medium
Find the inverse of 4 modulo 11: the number x with 0 < x < 11 and 4·x ≡ 1 (mod 11).
a = 4n = 11
4−1 mod 11 =
4.Medium
Find the smallest positive integer x with x ≡ 1 (mod 7) and x ≡ 7 (mod 9).
x ≡ 1 (mod 7)x ≡ 7 (mod 9)
x =
5.Hard
An RSA key uses p = 13, q = 29 and e = 19. Decrypt the ciphertext c = 294: find the message m.
p = 13q = 29e = 19c = 294
m =
6.Hard
Solve 52x ≡ 44 (mod 54). Give the smallest positive solution x.
52x ≡ 44 (mod 54)
x =
Answer key
- 1. gcd(406, 42) = 14
- 2. gcd(663, 481) = 13
- 3. 4−1 mod 11 = 3
- 4. x = 43
- 5. m = 122
- 6. x = 5
Full step-by-step solutions: practise this topic on examproblems.com.