Loading…
Loading…
Charting your lesson…
Opening your lesson…
Remainders and Modular Arithmetic
Lesson 3 of 6
6 steps•about 11 min•12 flashcards
Step 1/ 61 min
Remainder questions scare people because the numbers are huge — "find the remainder when 7^100 is divided by 5". The trick is that remainders add, subtract and multiply just like ordinary numbers, so you never handle the giant number at all.
What this topic tests: reducing large expressions modulo n, using negative remainders, and applying Fermat/Euler-style cyclicity for powers.
Step 2/ 61 min
Write a ≡ r (mod n) meaning "a leaves remainder r on division by n". The core fact: you may replace any number by its remainder before multiplying or adding.
Remainder of 17 × 23 mod 5 = (2 × 3) mod 5 = 6 mod 5 = 1. You never multiplied 391.
If a number is just below a multiple of n, use a negative remainder. 24 ≡ −1 (mod 5). So 24^100 ≡ (−1)^100 = 1. Likewise 99 ≡ −1 (mod 100), 26 ≡ −1 (mod 27). Turning a remainder into ±1 collapses any power instantly.
Remainders of powers cycle. To find 7^100 mod 5: 7 ≡ 2, and 2^1,2^2,2^3,2^4 ≡ 2,4,3,1 then repeat with period 4. 100 mod 4 = 0 → take the last of the cycle → 1.
Two named shortcuts:
Step 3/ 61 min
Remainder when 43^197 is divided by 7. 43 ≡ 1 (mod 7) because 42 is a multiple of 7. So 43^197 ≡ 1^197 = 1. The exponent 197 never mattered once the base reduced to 1.
Harder: 2^100 mod 7. 2^3 = 8 ≡ 1 (mod 7), period 3. 100 mod 3 = 1 → 2^1 = 2.
Step 4/ 61 min
TCS NQT "advanced" quant, Amazon and Goldman Sachs first rounds, and inside cyclicity/unit-digit and calendar (day-of-week) problems everywhere.
Step 5/ 61 min
Taking the exponent's remainder with the wrong number. You reduce the exponent by the cycle length, not by the modulus. For 2^100 mod 7 the cycle length is 3, so use 100 mod 3, not 100 mod 7.
Step 6/ 6· Worked examples1 min
Problem
Find the remainder when 2^100 is divided by 7.
Try it on paper first.
Recall
Keep this
Usage: reduce each factor mod m first, then use Fermat/Euler for large exponents.
Remainder questions are a placement favourite because they look scary but fall to a few modular rules. They show up in TCS NQT and Cognizant as "find the remainder when a huge power is divided by n".
Power method: reduce the base mod n, find a small power that gives 1 (or −1), then use the exponent.
Example: 2^10 mod 7. Since 2³ = 8 ≡ 1, write 2^10 = (2³)³ × 2 ≡ 1 × 2 = 2. (Check: 1024 = 7×146 + 2.) ✓
| Expression | Reduce to | Remainder |
|---|---|---|
| 2^10 mod 7 | 2³ ≡ 1 | 2 |
| 7^100 mod 5 | 7 ≡ 2, 2⁴ ≡ 1 | 1 |
| 3^101 mod 4 | 3 ≡ −1 | 3 |
Expected exam pattern: remainder of a large power, remainder of a factorial expression, "last two digits" (mod 100). 1 to 2 questions, ~1 minute each.
Quick recap: Reduce base mod n, hunt for a power giving 1 or −1, apply the exponent, and always report a positive remainder.
You've read 0 of 6 steps
Now lock it in — questions straight after reading are what make it stick.