Master remainder problems using the division algorithm, modular arithmetic, cyclicity of powers, and the Chinese Remainder Theorem. This lesson provides derivations, worked examples, shortcuts, and common traps to solve any remainder question confidently.
Remainders are the leftovers after division. They appear in number theory, competitive exams, and real-life scheduling. This lesson builds from the basic division algorithm to advanced techniques for powers and simultaneous congruences. You will learn to compute remainders quickly and avoid typical errors.
| Method | When to Use | Example |
|---|---|---|
| Division Algorithm | Basic remainder problems | 27 ÷ 7 = 3 remainder 6 |
| Modular Arithmetic | Simplifying expressions | 27 ≡ 6 (mod 7) |
| Cyclicity | Powers with small modulus | 2^100 mod 5: cycle length 4, 100 mod 4=0 ⇒ 1 |
| Fermat/Euler | Large exponents, prime/coprime modulus | 27^27 mod 7: 27≡-1, (-1)^27=-1≡6 |
| CRT | Simultaneous congruences | x≡5 mod7, x≡3 mod11 ⇒ x=47 |
For any integer a and positive integer n, there exist unique integers q (quotient) and r (remainder) such that a = nq + r, where 0 ≤ r < n. Here, a is the dividend, n is the divisor, q is the quotient, and r is the remainder. This formula is the bedrock of all remainder problems. It tells us that the remainder is always non-negative and less than the divisor. For example, when 27 is divided by 7, we write 27 = 7×3 + 6, so remainder is 6. The condition 0 ≤ r < n is crucial; if you get a negative remainder, add the divisor to make it non-negative. This formula also allows us to express any number in terms of its divisor and remainder, which is useful for solving congruences.
Modular arithmetic uses the notation a ≡ b (mod n) to mean a and b leave the same remainder when divided by n. Equivalently, n divides (a - b). This notation simplifies remainder calculations because we can replace numbers with their remainders. Key properties: if a ≡ b (mod n) and c ≡ d (mod n), then a+c ≡ b+d (mod n), a-c ≡ b-d (mod n), and a×c ≡ b×d (mod n). Also, if a ≡ b (mod n), then a^k ≡ b^k (mod n) for any positive integer k. These properties allow us to reduce large numbers before computing remainders. For example, to find 27^27 mod 7, we first reduce 27 mod 7: 27 ≡ 6 (mod 7), so 27^27 ≡ 6^27 (mod 7). Then we can use cyclicity.
When computing a^k mod n, the remainders of a^1, a^2, a^3, ... often repeat in a cycle. The length of this cycle is called the period or order. For example, powers of 2 modulo 5: 2^1≡2, 2^2≡4, 2^3≡3, 2^4≡1, 2^5≡2, so the cycle length is 4. To find a^k mod n, reduce k modulo the cycle length. If the cycle length is L, then a^k ≡ a^(k mod L) (mod n), with the convention that if k mod L = 0, use a^L. This method works when a and n are coprime, but often works even if not, after the first few terms. For 2^100 mod 5, cycle length 4, 100 mod 4 = 0, so remainder is 2^4 mod 5 = 1. For 3^91 mod 5: 3^1≡3, 3^2≡4, 3^3≡2, 3^4≡1, cycle length 4, 91 mod 4 = 3, so remainder is 3^3 mod 5 = 27 mod 5 = 2. Verify: 3^4≡1, so 3^88≡1, and 3^91 = 3^88·3^3 ≡ 1·27 ≡ 2 (mod 5).
When a number x satisfies multiple congruences with pairwise coprime moduli, CRT gives a unique solution modulo the product. For two congruences: x ≡ a (mod m) and x ≡ b (mod n), with gcd(m,n)=1, the solution is x ≡ a + m * t (mod mn), where t ≡ (b - a) * m^{-1} (mod n). Here m^{-1} is the modular inverse of m modulo n. For example, x ≡ 5 (mod 7) and x ≡ 3 (mod 11). m=7, n=11. m^{-1} mod 11: 7*8=56≡1 mod 11, so inverse is 8. t ≡ (3-5)*8 = -2*8 = -16 ≡ -5 ≡ 6 mod 11. Then x ≡ 5 + 7*6 = 47 mod 77. So smallest positive is 47. This method generalizes to more congruences. CRT is powerful for problems like 'find the smallest number that leaves remainders...'.
Fermat's Little Theorem: If p is prime and gcd(a,p)=1, then a^{p-1} ≡ 1 (mod p). This is a special case of Euler's Theorem: If gcd(a,n)=1, then a^{φ(n)} ≡ 1 (mod n), where φ(n) is Euler's totient function. These theorems provide the cycle length directly. For example, modulo 7 (prime), for any a not divisible by 7, a^6 ≡ 1 (mod 7). So to compute 27^27 mod 7, reduce base: 27≡6 mod 7. Then 6^6≡1, so 6^27 = 6^{6*4+3} ≡ (6^6)^4 * 6^3 ≡ 1 * 216 ≡ 216 mod 7. 216 = 7*30 + 6, so remainder 6. This matches the given answer. Euler's theorem is useful when modulus is composite but coprime to base.
For quick calculations, use these tricks: 1) Reduce base modulo divisor first. 2) For powers, find cycle length by computing successive remainders until repetition. 3) Use negative remainders: if a ≡ -1 (mod n), then a^k ≡ (-1)^k (mod n). 4) For numbers like 10^k mod 9, note 10 ≡ 1, so remainder is 1. 5) For divisibility by 3 or 9, sum digits. 6) For modulo 11, alternating sum. 7) When divisor is small, list remainders. 8) Use CRT for simultaneous congruences. Practice these to speed up.
Trap 1: Forgetting that remainder must be non-negative. Always convert negative remainders by adding divisor. Trap 2: Assuming you can divide in modular arithmetic without checking coprimality. Trap 3: Using cycle length incorrectly when base and modulus are not coprime. Trap 4: Misapplying CRT when moduli are not coprime. Trap 5: Reducing exponent modulo wrong number (should be cycle length, not modulus). Trap 6: Confusing quotient and remainder. Trap 7: Not verifying with small cases. Always double-check with a simple example or alternate method.
Use the division algorithm for basic remainder problems. Use modular arithmetic for simplifying expressions. Use cyclicity for powers when modulus is small or when you can find a short cycle. Use Fermat/Euler for large exponents with prime or coprime modulus. Use CRT for simultaneous congruences. For problems like 'remainder when square of a number is divided', use modular arithmetic: if x ≡ 3 (mod 5), then x^2 ≡ 9 ≡ 4 (mod 5). For 'smallest number satisfying remainders', use CRT. Always identify the structure: is it a power? simultaneous? Then choose the appropriate tool.
1) Reduce base: 27 mod 7 = 6 ≡ -1 (mod 7). 2) So 27^27 ≡ (-1)^27 = -1 ≡ 6 (mod 7). 3) Remainder is 6.
1) Find cycle of 2 mod 5: 2^1=2, 2^2=4, 2^3=8≡3, 2^4=16≡1, cycle length 4. 2) 100 mod 4 = 0, so use 2^4 ≡ 1. 3) Remainder is 1.
1) 7 ≡ 1 (mod 6). 2) So 7^85 ≡ 1^85 = 1 (mod 6). 3) Remainder is 1.
1) Let x ≡ 5 (mod 7) and x ≡ 3 (mod 11). 2) x = 7k + 5. 3) Substitute: 7k + 5 ≡ 3 (mod 11) ⇒ 7k ≡ -2 ≡ 9 (mod 11). 4) Inverse of 7 mod 11 is 8 (since 7*8=56≡1). 5) k ≡ 9*8 = 72 ≡ 6 (mod 11). 6) Smallest k=6 gives x=7*6+5=47. 7) Check: 47 mod 7 = 5, 47 mod 11 = 3. So answer 47.
1) x ≡ 5 (mod 7), x ≡ 7 (mod 9). 2) x = 7k + 5. 3) 7k + 5 ≡ 7 (mod 9) ⇒ 7k ≡ 2 (mod 9). 4) Inverse of 7 mod 9 is 4 (7*4=28≡1). 5) k ≡ 2*4=8 (mod 9). 6) Smallest k=8 gives x=7*8+5=61. 7) Check: 61 mod 7 = 5, 61 mod 9 = 7. So answer 61.
1) Let number be n ≡ 3 (mod 5). 2) Then n^2 ≡ 3^2 = 9 ≡ 4 (mod 5). 3) Remainder is 4.
1) Find cycle of 3 mod 5: 3^1=3, 3^2=9≡4, 3^3=27≡2, 3^4=81≡1, cycle length 4. 2) 91 mod 4 = 3, so 3^91 ≡ 3^3 = 27 ≡ 2 (mod 5). 3) Remainder is 2.
The remainder is always 0 because every integer is divisible by 1. In the division algorithm, a = 1*a + 0, so r=0.
No, by definition the remainder r in a = nq + r must satisfy 0 ≤ r < n. If you get a negative value, add the divisor to make it non-negative. For example, -1 mod 7 is 6.
Find the cycle of remainders for powers of 2 modulo 5: 2,4,3,1,2,... The cycle length is 4. Divide the exponent by 4: 100 ÷ 4 = 25 remainder 0, so the remainder is the last in the cycle, which is 1.
It states that if you have a system of congruences with pairwise coprime moduli, there is a unique solution modulo the product of the moduli. It is used to find a number that leaves specified remainders when divided by several numbers.
You can use it when the modulus is prime and the base is not a multiple of that prime. It states that a^{p-1} ≡ 1 (mod p). This helps reduce large exponents.
The remainder is 0 because 0 = n*0 + 0. The quotient is 0 and remainder is 0.