Divisibility, remainders and the power cycle
The number-system shortcuts that turn a 90-second calculation into a 10-second one.
- Apply divisibility rules for 2, 3, 4, 8, 9, 11 without a calculator
- Find the unit digit of any a^b using the power-cycle method in under 15 seconds
- Compute remainders using modular arithmetic
TCS NQT first quant question: "What is the unit digit of 7^256?" Sixty thousand students saw this. Most tried to multiply 7 by itself and ran out of time.
There is a four-second method. Every power of every digit repeats its unit digit in a cycle of at most 4. Once you know the cycle, the question is a remainder, not a multiplication.
Divisibility rules you must know cold
| Divisor | Rule | Example |
|---|---|---|
| 2 | Last digit even | 348 yes |
| 3 | Sum of digits divisible by 3 | 471: 4+7+1=12 yes |
| 4 | Last two digits divisible by 4 | 1316: 16 yes |
| 8 | Last three digits divisible by 8 | 10576: 576 yes |
| 9 | Sum of digits divisible by 9 | 6354: 18 yes |
| 11 | Alternating sum divisible by 11 | 9182: (9+8)-(1+2)=14 no |
The power cycle (unit digit)
The unit digit of a^b depends only on the unit digit of a, and it cycles with period 1, 2 or 4:
| Base unit | Cycle | Period |
|---|---|---|
| 0, 1, 5, 6 | itself | 1 |
| 4, 9 | 4 then 6, 9 then 1 | 2 |
| 2, 3, 7, 8 | period 4 | 4 |
To find the unit digit of a^b: take b mod (cycle period). If the result is 0, use the last element of the cycle. For very large exponents, reduce b mod 4 first (for period-4 cycles).
Modular arithmetic essentials
- (a + b) mod d = ((a mod d) + (b mod d)) mod d
- (a x b) mod d = ((a mod d) x (b mod d)) mod d
These let you reduce any huge number to a one-digit calculation before you touch it.
| Expression | Cycle position | Unit digit |
|---|---|---|
| 7^256 | 256 mod 4 = 0, last in 7-9-3-1 | 1 |
| 3^47 | 47 mod 4 = 3, third in 3-9-7-1 | 7 |
| 9^123 | odd power of 9 | 9 |
| 4^99 | odd power of 4 | 4 |
For any base ending in 2, 3, 7 or 8, compute (exponent mod 4) before anything else. If it is 0, the answer is the last element of the cycle. This single habit removes most of the time pressure.
- 1
Step 1 - identify the cycle
Powers of 7 cycle as 7, 9, 3, 1 with period 4.
- 2
Step 2 - reduce the exponent
256 / 4 = 64 exactly, so 256 mod 4 = 0. A remainder of 0 means the last element of the cycle.
256 mod 4 = 0 -> use 4th element of (7,9,3,1) - 3
Step 3 - read off the answer
The 4th element is 1. So 7^256 ends in 1.
- 4
Step 4 - the second part: mod 5
7 mod 5 = 2. So 7^257 mod 5 = 2^257 mod 5. Powers of 2 mod 5 cycle 2,4,3,1 with period 4. 257 mod 4 = 1, so the answer is 2.
Solution
Unit digit of 7^256 = 1. 7^257 mod 5 = 2. Notice the second part did not need the unit digit at all - reducing the base mod 5 first is faster when the modulus is 5.
Find the unit digit of each, then check with the cycle: 1. 3^47 2. 8^2025 3. 4^99 4. 9^50 5. 2^303 Write down the cycle, reduce the exponent mod the period, then read the answer. Time yourself - each should take under 15 seconds.
Hint: For 8^2025: cycle of 8 is 8-4-2-6 (period 4). 2025 mod 4 = 1, so the answer is the 1st element: 8.
Multiplying out the power instead of using the cycle
Never compute 7^256. Reduce the exponent mod 4 and read the cycle. The cycle exists precisely so you never multiply.
Using the digit-sum rule for every divisor
Digit sum works for divisibility by 3 and 9 only. For 7, 11, 13 you need the direct rule or modular arithmetic.
Forgetting that remainder 0 means the last cycle element
If exponent mod period = 0, the answer is the LAST element of the cycle, not the first. 256 mod 4 = 0, use 1 not 7.
What is the unit digit of 7^256?
1. The unit digits of powers of 7 cycle as 7, 9, 3, 1 with period 4. Since 256 is divisible by 4, the unit digit is the last element of the cycle: 1.
Source: TCS NQT / Infosys OA style
- Divisibility: 3 and 9 use digit sum; 4 and 8 use last 2/3 digits; 11 uses alternating sum.
- Unit digit of a^b: find the cycle of a (period 1, 2 or 4), reduce b mod the period.
- Remainder 0 from the reduction means the LAST element of the cycle.
- Always reduce the exponent first - it is the fastest single step.