Find (508·768) mod 5 without multiplying out the large numbers: reduce first.
Number theory & modular arithmetic worksheet with answers
1.Easy
n = 5
(508·768) mod 5 =
2.Easy
Use Euclid’s algorithm to find gcd(138, 36).
a = 138b = 36
gcd(138, 36) =
3.Medium
Find the smallest positive integer x with x ≡ 2 (mod 7) and x ≡ 4 (mod 10).
x ≡ 2 (mod 7)x ≡ 4 (mod 10)
x =
4.Medium
Find Euler’s totient φ(1625), the number of integers from 1 to 1625 that are coprime to 1625.
n = 1625 = 53·13
φ(1625) =
5.Hard
How many solutions N does 18x ≡ 26 (mod 50) have in {0, 1, …, 49}?
18x ≡ 26 (mod 50)
N =
6.Hard
An RSA key uses p = 29, q = 41 and e = 3. Decrypt the ciphertext c = 465: find the message m.
p = 29q = 41e = 3c = 465
m =
Answer key
- 1. (508·768) mod 5 = 4
- 2. gcd(138, 36) = 6
- 3. x = 44
- 4. φ(1625) = 1200
- 5. N = 2
- 6. m = 407
Full step-by-step solutions: practise this topic on examproblems.com.