Find (777·217 + 391) mod 7 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 7
(777·217 + 391) mod 7 =
2.Easy
Use Euclid’s algorithm to find gcd(495, 77).
a = 495b = 77
gcd(495, 77) =
3.Medium
Find the smallest positive integer x with x ≡ 7 (mod 8) and x ≡ 8 (mod 9).
x ≡ 7 (mod 8)x ≡ 8 (mod 9)
x =
4.Medium
Find the inverse of 66 modulo 71: the number x with 0 < x < 71 and 66·x ≡ 1 (mod 71).
a = 66n = 71
66−1 mod 71 =
5.Hard
An RSA key uses p = 31, q = 37 and e = 17. Decrypt the ciphertext c = 417: find the message m.
p = 31q = 37e = 17c = 417
m =
6.Hard
How many solutions N does 42x ≡ 40 (mod 44) have in {0, 1, …, 43}?
42x ≡ 40 (mod 44)
N =
Answer key
- 1. (777·217 + 391) mod 7 = 6
- 2. gcd(495, 77) = 11
- 3. x = 71
- 4. 66−1 mod 71 = 14
- 5. m = 359
- 6. N = 2
Full step-by-step solutions: practise this topic on examproblems.com.