About this topic
Number theory is the part of math about whole numbers β 1, 2, 3, β¦ β and how they break apart into smaller whole numbers. It's the oldest branch of math. The Greeks did number theory 2500 years ago. You'll do some of it on test day.
A good chunk of every contest is number theory: maybe a divisibility test (“is this number a multiple of 7?”), a prime question (“sum of two primes”), or a units-digit puzzle (“what's the last digit of 9 to the 100th power?”). Each of these has a fast method once you know the trick.
This lesson teaches the 9 most useful number-theory ideas. Take your time with each chapter β the ideas build on each other. Primes power the factor tree, the factor tree powers GCD and LCM, and so on.
Divisibility rules β test without dividing
Quick: is 3,471 a multiple of 3? You did not reach for long division — you can't, in your head, that fast. But there IS a way to know in two seconds. Add the digits: 3+4+7+1 = 15. That's a multiple of 3, so 3,471 is too. No dividing.
That's the whole game of this chapter. Divisible means “splits evenly, no leftover.” 12 is divisible by 3 because 12 ÷ 3 = 4 exactly; 13 is not, because 13 ÷ 3 leaves 1 over. You COULD test by dividing — but for every common divisor (2, 3, 4, 5, 6, 8, 9, 10, 11) there's a shortcut rule that reads the answer straight off the digits. Learn these cold. They show up on almost every contest.
DIVISIBILITY RULES (memorize all)
- By 2: the last digit is 0, 2, 4, 6, or 8 (even). Example: 358 β (ends in 8); 359 β.
- By 5: the last digit is 0 or 5. Example: 1745 β; 1746 β.
- By 10: the last digit is 0. Example: 250 β; 251 β.
- By 4: the last two digits form a number divisible by 4. Example: 132 β (32 is 4Γ8); 130 β.
- By 8: the last three digits form a number divisible by 8. Example: 9104 β (104 = 8Γ13); 9100 β.
- By 3: add up all the digits β if that sum is divisible by 3, the number is too. Example: 471: 4+7+1 = 12, which is 3Γ4 β.
- By 9: same as 3 but for 9. Example: 5238: 5+2+3+8 = 18 = 9Γ2 β.
- By 6: the number must be divisible by both 2 and 3 β use both rules above.
- By 11: take the digits in alternating signs (+, β, +, β, β¦) and add them. If that total is 0 or a multiple of 11, the number is divisible by 11. Example: 8074: 8 β 0 + 7 β 4 = 11 β.
The weird rules β divisibility by 7 and 13
The rules for 7 and 13 don't look anything like the others. They feel like party tricks. They are party tricks β but they work, and competition kids who know them save real time.
DIVISIBILITY BY 7 β “chop, double, subtract”
- Chop off the LAST digit.
- DOUBLE it.
- SUBTRACT that from what's left.
- If the result is divisible by 7 (including 0 or a negative multiple), the original number is too. If still big, repeat.
Examples.
- Is 161 divisible by 7? Chop the 1: leaves 16. Double the 1: 2. Subtract: 16 β 2 = 14. Yes, 14 = 7Β·2 β. (And 161 = 7Β·23.)
- Is 203 divisible by 7? Chop 3, double = 6, subtract from 20: 20 β 6 = 14 β.
- Is 1,729 divisible by 7? Chop 9, double = 18. 172 β 18 = 154. Still big β repeat. Chop 4, double = 8. 15 β 8 = 7 β. So 1729 is divisible by 7.
DIVISIBILITY BY 13 β “chop, times 4, ADD”
- Chop off the LAST digit.
- MULTIPLY it by 4.
- ADD to what's left.
- If the result is divisible by 13, the original is too. Repeat if big.
Examples.
- Is 169 divisible by 13? Chop 9, times 4 = 36. 16 + 36 = 52 = 13Β·4 β. (And 169 = 13Β².)
- Is 1001 divisible by 13? Chop 1, times 4 = 4. 100 + 4 = 104 = 13Β·8 β.
The 1001 magic β one trick for 7, 11, AND 13
Here's a fact every contest kid should memorize:
1001 = 7 Γ 11 Γ 13
This single identity unlocks a SHARED divisibility test for all three of those primes:
1001-TRICK (works for 7, 11, AND 13)
- Split the number into 3-digit groups starting FROM THE RIGHT (the rightmost group can have fewer digits).
- Take the ALTERNATING SUM of those groups (right minus next minus +nextβ¦).
- If the alternating sum is divisible by 7, 11, or 13, the original is too.
Example. Is 247,247 divisible by 7, 11, and 13?
- Groups from the right: 247 and 247.
- Alternating sum: 247 β 247 = 0.
- 0 is divisible by everything, so 247,247 is divisible by all of 7, 11, and 13 β.
This is exactly the famous “6-digit ABCABC trick”: any number that repeats a 3-digit block β like 247247 or 854854 β equals abc Β· 1001, so it's automatically divisible by 7, 11, AND 13.
Be honest with yourself. If you're going to memorize ONE “weird” fact, make it 1001 = 7Β·11Β·13. The chop-double-subtract rule for 7 and the chop-times-4-add rule for 13 are bonus tricks for showing off β useful sometimes, but the 1001 identity is the one that pays off on real contest problems.
Why does the rule work? Watch the pattern.
Here are the first 10 multiples of 9. Add the digits of each one:
Always 9. Not a trick — a pattern.
For bigger numbers, the digit sum might be 18 or 27 or 36 instead — but those are all multiples of 9 too. So the rule still works:
- 144 → 1+4+4 = 9 ✓ (144 = 9×16)
- 198 → 1+9+8 = 18 ✓ (18 is 9×2)
- 999 → 9+9+9 = 27 ✓ (27 is 9×3)
For older kids: where does this pattern come from?
It comes from the fact that 10 is 9 + 1. And 100 is 99 + 1, and 1000 is 999 + 1. Each of 9, 99, 999, … is itself divisible by 9.
So for a number like 471: the 400 is “4 piles of 99, plus 4 extra.” The 70 is “7 piles of 9, plus 7 extra.” The 1 is only 1. Pulling out all the “piles of 9 or 99”, what's left is 4 + 7 + 1 = 12 — the digit sum.
In symbols: 471 = 4(99+1) + 7(9+1) + 1 = (4·99 + 7·9) + (4+7+1). The first chunk is built only from multiples of 9, so it doesn't change whether 471 is a multiple of 9. All that matters is the digit sum.
Why the LAST-DIGITS rules work — the big part falls away
The ÷4 rule (look at the last two digits) and the ÷8 rule (last three) feel arbitrary. They're not. The reason is one tiny fact: 4 divides 100, and 8 divides 1000.
Take any number and chop it at the hundreds: 7,328 is 73×100 + 28. The chunk 73×100 is built entirely out of 100s — and every 100 is 4×25, so that whole chunk is already a stack of 4s. It can't tip the answer. Only the leftover 28 decides it.
Same story for 8: every 1000 is 8×125, so the thousands-and-up chunk is a stack of 8s and falls away — only the last three digits get a vote. That's the whole reason the rule stops where it does.
Why the ÷3 and ÷9 rule works — every 10 is “one extra”
You saw the pattern for 9 above. Here's the engine behind it in one line: 10 leaves a leftover of 1 when you divide by 9 (10 = 9 + 1). So does 100 (= 99 + 1), and 1000, and every power of 10.
So when you build 471 as 4×100 + 7×10 + 1, each hundred contributes “1 leftover,” each ten contributes “1 leftover,” and the ones contribute themselves. Sweep up all the leftovers and you get exactly 4 + 7 + 1 — the digit sum. The digit sum IS the leftover (mod 9). Since 3 also divides 9-and-friends the same way, the rule works for 3 too.
Why the ÷11 rule alternates + − + −
Multiply any four-digit number ABCD by 11 and watch the digits. Each digit lands in TWO neighboring columns at once (because 11 = 10 + 1), so the columns become:
Add them with alternating signs and every letter cancels: A − (A+B) + (B+C) − (C+D) + D = 0. That cancellation is exactly why the alternating digit sum of any multiple of 11 comes out to 0 (or a multiple of 11). The deeper reason: powers of 10 bounce +1, −1, +1, −1 mod 11 (since 10 = 11 − 1), which is where the alternating signs are born.
The one engine behind EVERY rule — multiples add and subtract
Every rule above is really the same trick wearing different costumes. Here is the engine they all run on:
THE MULTIPLE ENGINE
- If two numbers are BOTH multiples of
c, then their sum and their difference are multiples ofctoo. - If you add a multiple of
cto a number that is NOT a multiple ofc, the result is never a multiple ofc.
Picture three baskets, each holding exactly 7 eggs. Pour two together: 14 eggs, still a clean stack of 7s. Pour one out: 7 eggs, still clean. You can never get a leftover by combining whole baskets — a leftover can only come from a basket that wasn’t full to begin with.
That is exactly why we keep saying “the big chunk falls away.” Take 7328 tested for 4: we wrote it as 7300 + 28. The 7300 is a stack of 4s (a multiple), so by the engine it can’t change the answer — only the leftover 28 votes. And if 28 had NOT been a multiple of 4, adding the clean 7300 could never rescue it. The digit-sum rule, the last-digits rule, the alternating-sum rule — each one peels off a big multiple-of-c chunk and leaves a tiny leftover that decides everything.
Testing a COMPOSITE — split it, but only the RIGHT way
There’s no special digit rule for 36. So how do you test it fast? Break 36 into a product and test each piece. We already do this for 6 (“divisible by 2 AND 3”). The catch most people miss: it only works when the two pieces share no common factor.
The good split. 36 = 4 × 9, and 4 and 9 share nothing (their GCD is 1 — they’re relatively prime). So a number is divisible by 36 exactly when it passes the rule for 4 AND the rule for 9, separately.
- Is 612 divisible by 36? By 4: last two digits 12 = 4×3 ✓. By 9: digit sum 6+1+2 = 9 ✓. Both pass ⇒ yes. (Check: 612 = 36×17.)
“36 = 3 × 12, so test divisible-by-3 and divisible-by-12.” Try 24: it’s divisible by 3 (digit sum 6) and by 12 (24 = 12×2) — yet 24 is NOT a multiple of 36.
Why it breaks: 3 and 12 share a factor of 3, so “passes 3 and passes 12” only guarantees divisibility by lcm(3,12) = 12, not 36. The overlap gets counted once instead of twice. The fix: split into pieces with no shared factor (relatively prime), and their product gives the real test. 4 × 9 works because lcm(4,9) = 36; 3 × 12 fails because lcm(3,12) = 12.
612 ÷ 36 = ?612 ÷ 36 = 17.WORKED EXAMPLE — amc8-2024-05
Aaliyah rolls two dice and the PRODUCT is a multiple of 6. Which listed sum (5, 6, 7, 8, 9) can the two numbers NOT add to?
Use the split: 6 = 2 × 3 with 2 and 3 relatively prime. So the product is a multiple of 6 exactly when, between the two dice, there’s at least one even face AND at least one multiple of 3 (a 3 or a 6).
Now check each target sum — can a pair hitting that sum supply both a factor of 2 and a factor of 3? Sum 6 splits only as 1+5, 2+4, 3+3 (products 5, 8, 9): none has BOTH an even face and a 3-or-6. Every other listed sum has a working pair — 5 = 2+3, 7 = 1+6, 8 = 2+6, 9 = 3+6. So the impossible one is sum 6.
Framing inspired by AoPS Prealgebra.
Pictured-intuition adapted from Competition Math for Middle School (AoPS).
When a problem tells you something is divisible by k and asks for an unknown digit, use the rule for k to figure out what the missing digit must be.
Example. Find the digit ? so that 1?2 is divisible by 9. By the rule, the digit sum 1 + ? + 2 must be a multiple of 9. So 3 + ? needs to equal 9, 18, 27, β¦. The only single-digit choice is ? = 6. Check: 162 Γ· 9 = 18 β.
Another. Find ? so that 43?2 is divisible by 4. Only the last two digits matter (rule for 4), so we need ?2 divisible by 4. Test by the tens digit: for ? β {1, 3, 5, 7, 9} the last two digits are 12, 32, 52, 72, 92 β all divisible by 4 β. For ? β {0, 2, 4, 6, 8} the last two digits are 02, 22, 42, 62, 82 β none are divisible by 4 β. So the five odd choices of ? work, giving five answers.
Eleven members of the Middle School Math Club each paid the same integer amount for a guest speaker to talk about problem solving at their math club meeting. In all, they paid their guest speaker $1A2. What is the missing digit A of this 3-digit number?
Eleven club members each pay the SAME whole-dollar amount, and the total comes to $1A2 (a three-digit number with a missing middle digit). Find A.
Here's the move that turns a money sentence into a number-theory fact: “11 equal shares” means the total is a multiple of 11. So 1A2 must be divisible by 11.
Use the rule for 11 — alternating sum of the digits: 1 − A + 2 = 3 − A, and that must be a multiple of 11 (including 0).
A is a single digit, so 3 − A sits between 3 − 9 = −6 and 3 − 0 = 3. The only multiple of 11 in that window is 0. So 3 − A = 0, giving A = 3.
Check: 132 = 11 × 12 ✓. The missing digit is 3.
The unlock isn't the divisibility rule — it's the translation. “n people pay the same whole amount” always means “the total is divisible by n.” Once you write that, the alternating-sum rule for 11 finishes it in one line.
Don't long-divide. Use the rules. For ones digit β mod 2, 5, 10. For last two digits β mod 4. For digit sum β mod 3, 9. For alternating sum β mod 11. For 7 β chop, double, subtract. For 13 β chop, Γ4, add. For 7/11/13 together β use that 1001 = 7Β·11Β·13 (3-digit groups, alternating sum).
2016 Β· #5 The number N is a two-digit number.When N is divided by 9, the remainder is 1.When N is divided by 10, the remainder is 3.What is the...
The number N is a two-digit number.
- When N is divided by 9, the remainder is 1.
- When N is divided by 10, the remainder is 3.
What is the remainder when N is divided by 11?
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- "Leftover 3 when divided by 10" means the units digit is 3, so N ∈ {13, 23, 33, 43, 53, 63, 73, 83, 93}.
- Digit-sum test for division by 9 (a number and its digit sum leave the same leftover): 13→4, 23→5, …, 73→10 which leaves 1. Only 73 leaves a leftover of 1. So N = 73.
- Now answer the real question: 73 = 11 × 6 + 7, so the leftover when divided by 11 is 7.
- Why this transfers: when several remainder conditions overlap, start with the one that fixes the most (divide-by-10 fixes a whole digit), then sieve the short list — far faster than algebra.
2016 Β· #9 Alex has one rope 1Β m long and another 2Β m long. He cuts up both ropes so that all the pieces are of equal length. Which of the...
Alex has one rope 1 m long and another 2 m long. He cuts up both ropes so that all the pieces are of equal length. Which of the following numbers of pieces can he not obtain this way?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Equal pieces must divide both ropes exactly, so each piece is 1/n of a metre for some whole number n.
- Then the 1 m rope makes n pieces and the 2 m rope makes 2n pieces, for 3n pieces in all — always a multiple of 3.
- Among the options 6, 9, 12 and 15 are multiples of 3, but 8 is not, so 8 pieces cannot be obtained.
2005 Β· #18 How many three-digit numbers are divisible by 13?
How many three-digit numbers are divisible by 13?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Write each multiple as 13k. Smallest 3-digit one: 100 ÷ 13 ≈ 7.7, so k = 8 gives 13·8 = 104. Largest: 999 ÷ 13 ≈ 76.8, so k = 76 gives 13·76 = 988.
- So k runs through 8, 9, …, 76 — a block of consecutive integers. Count them: 76 − 8 + 1 = 69.
- The two things people botch: remember the +1 (counting endpoints, not gaps — that's why it's 69, not 68), and translate the problem into counting k's rather than the multiples themselves. This 'count the index' trick works for any 'how many multiples in a range' question.
2024 Β· #5 Aaliyah rolls two standard 6-sided dice. She notices that the product of the two numbers rolled is a multiple of 6. Which of the...
Aaliyah rolls two standard 6-sided dice. She notices that the product of the two numbers rolled is a multiple of 6. Which of the following integers cannot be the sum of the two numbers?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The insight: "multiple of 6" means "has a factor 2 AND a factor 3." So the pair must contain at least one even number AND at least one 3 or 6. That's the only condition — no need to multiply anything out.
- Now test each sum. Sum 6 can only be (1,5), (2,4), or (3,3). Check: (1,5) has no even-and-3, (2,4) has no 3 or 6, (3,3) has a 3 but no even number. None qualify — so a sum of 6 is impossible.
- Every other choice does have a qualifying pair: 5 = (2,3), 7 = (1,6), 8 = (2,6), 9 = (3,6). Answer: 6. This transfers: to test divisibility by a composite like 6, 12, or 15, split it into prime factors and check each one separately.
- Pairs whose product is a multiple of 6 (need a multiple of 3 and an even number): (1,6), (2,3), (2,6), (3,6), (4,6), (5,6), (6,6).
- Their sums: 7, 5, 8, 9, 10, 11, 12. Among A–E, only 6 is missing.
2011 Β· #21 The five-digit number 24X8Y is divisible by 4, 5 and 9. What is the sum of X and Y?
The five-digit number 24X8Y is divisible by 4, 5 and 9. What is the sum of X and Y?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Divisible by 5 means Y is 0 or 5; divisible by 4 needs the last two digits 8Y divisible by 4, forcing Y = 0.
- Divisible by 9 means 2+4+X+8+0 = 14+X is a multiple of 9, so X = 4.
- Then X + Y = 4 + 0 = 4.
2016 Β· #24 The digits 1, 2, 3, 4, and 5 are each used once to write a five-digit number PQRST. The three-digit number PQR is divisible by 4, the...
The digits 1, 2, 3, 4, and 5 are each used once to write a five-digit number PQRST. The three-digit number PQR is divisible by 4, the three-digit number QRS is divisible by 5, and the three-digit number RST is divisible by 3. What is P?
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Divisible-by-5 is strictest: QRS ends in S, which must be 0 or 5, so S = 5.
- Divisible-by-4: QR (the last two digits of PQR) must be a multiple of 4 built from {1, 2, 3, 4} — only 12, 24, 32 work. Three cases.
- QR = 12: leftovers {3, 4} for P, T; RST = 25T has digit sum 7 + T, and T ∈ {3, 4} gives 10 or 11 — not divisible by 3. Out.
- QR = 24: leftovers {1, 3}; RST = 45T has digit sum 9 + T, and T = 3 gives 12, divisible by 3. ✓ That forces P = 1, so PQRST = 12435 and P = 1.
- QR = 32: leftovers {1, 4}; RST = 25T sum 7 + T with T ∈ {1, 4} gives 8 or 11 — not divisible by 3. Out. Only one solution survives.
- Why this transfers: for digit puzzles with several divisibility rules, always resolve the most restrictive constraint first (it pins digits outright), which shrinks the casework before the looser rules ever come up.
Primes β the building blocks
Take 12 marbles. You can lay them in a neat rectangle a few ways: 2 rows of 6, 3 rows of 4. Now try 7 marbles. One row of 7 — and that's it. No fatter rectangle works. Some numbers refuse to be split into a rectangle. Those are the special ones.
A prime number is a whole number bigger than 1 that you CAN’T break into a multiplication of smaller whole numbers. Its only divisors are 1 and itself.
The opposite is composite — it splits. 6 = 2 × 3, so 6 is composite. 7 won’t split, so 7 is prime. Primes are the atoms of the number world: every other number is built by multiplying primes together.
Here’s the picture: imagine arranging n dots into a rectangle. If you can ONLY form a 1-by-n strip, the number is prime. If you can form a fatter rectangle, it’s composite.
How to FIND every prime — the Sieve of Eratosthenes
A Greek named Eratosthenes found a way to catch every prime under 100 with no dividing at all — only crossing out. The idea: primes are whatever is LEFT once you remove every multiple.
Write 1 to 100 in a grid. Then:
- Cross out 1 (not prime). Circle 2, then cross out every other multiple of 2 (4, 6, 8, …).
- Circle 3 (still standing), then cross out every multiple of 3 (6, 9, 12, …).
- Circle 5, cross out its multiples. Then 7, cross out its multiples.
- Stop. You only need to sieve by primes up to
√100 = 10— that's only 2, 3, 5, 7. Everything still uncrossed is prime.
Why stop at 7? Same reason as the prime-test below: any composite under 100 must have a factor at or below √100 = 10, so the strikers 2, 3, 5, 7 catch all of them. The 25 survivors are exactly the primes under 100.
Pictured-intuition adapted from Competition Math for Middle School (AoPS).
The first 15 primes — memorize on sight
Below 50 there are exactly 15 primes. Color them red on the 1–50 grid:
Three facts you’ll use again and again
| Fact | Why it matters |
|---|---|
| 1 is NOT prime. | It has only one divisor (itself), not two. Don’t call it the “smallest prime.” |
| 2 is the ONLY even prime. | Every other even number splits as 2 × (something). HUGE for “sum of two primes” problems. |
| Primes go on forever. | Euclid proved this 2300 years ago. They thin out but never stop. |
How to test if n is prime — the √n shortcut
You don’t need to try every divisor up to n − 1. Just primes up to √n. Why? Because if n = a × b with both factors bigger than √n, the product would overshoot n — impossible. So at least one factor must be small.
The only-even-prime-is-2 rule is huge. Whenever a problem asks about a sum of two primes equaling an odd number, one of them must be 2 (because odd = even + odd, and the even one has to be 2 since 2 is the only even prime).
Example. Can 41 be the sum of two primes? Since 41 is odd, one prime is 2, the other must be 41 β 2 = 39 = 3Β·13. Not prime. So 41 cannot be written as a sum of two primes.
Is 143 prime? It’s odd, so not divisible by 2. Its digits add to 8, so not divisible by 3. It doesn’t end in 0 or 5, so not divisible by 5. And 143 ÷ 7 isn’t whole. Tested 2, 3, 5, 7 — all fail — so 143 is PRIME.
Why it breaks: the √n test says go up to √143 ≈ 11.96, so you must also try 11 — and 143 = 11 × 13. Stopping at 7 quit one prime too soon.
The fix: test every prime whose square is ≤ n. Since 11² = 121 ≤ 143 but 13² = 169 > 143, the real stop is 11, not 7. Find √n first, then test every prime up to it — don’t stop early.
The sum of two prime numbers is 85. What is the product of these two prime numbers?
The sum is 85, which is odd. So one of the two primes is even β that means it's 2.
The other prime: 85 β 2 = 83. Is 83 prime? Check β83 β 9.1, so test 2, 3, 5, 7. 83 is odd, digit sum 11 (not a multiple of 3), doesn't end in 0 or 5, and 83 Γ· 7 β 11.86 β not whole. So yes, 83 is prime β.
The two primes are 2 and 83. Their product: 2 Γ 83 = 166.
Parity (odd vs. even) is your first move in any prime problem. “Odd target = sum of two primes” forces one of them to be 2.
Know primes up to 50 by sight. The only even prime is 2 β use it whenever the puzzle involves an odd target. To check if a number is prime, test divisibility by primes up to βn.
2020 Β· #1 Which of the following additions does not give a prime number?
Which of the following additions does not give a prime number?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The sums are 13, 11, 17, 7 and 12.
- 13, 11, 17 and 7 are all prime (no smaller divisor works).
- 5 + 7 = 12 = 2 × 6, which is composite.
- So the sum that is not prime is choice E.
2003 Β· #2 Which of the following numbers has the smallest prime factor?
Which of the following numbers has the smallest prime factor?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The winner needs the tiniest prime factor, and no prime beats 2. So the real question is: which choice is even? An even number automatically has 2 as its smallest prime factor.
- 58 is the only even number on the list, so its smallest prime factor is 2 — smaller than any odd number can manage. Answer 58.
- You'll see this again: 'smallest/largest prime factor' problems reward looking for the small primes (2, then 3, then 5) first rather than fully factoring every option.
2007 Β· #3 What is the sum of the two smallest prime factors of 250?
What is the sum of the two smallest prime factors of 250?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 250 ends in 0, which means it's divisible by both 2 and by 5 — the two smallest primes any number can have. So the two smallest are 2 and 5 with no work.
- Sum: 2 + 5 = 7.
- Why you can stop: 2 and 5 are the smallest two primes that exist, so once a number has both, nothing smaller can sneak in. (Fully, 250 = 2 · 53, but you never needed that.)
2023 Β· #4 (figure problem)

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The clever move is to ignore the picture's prettiness and just ask: which four numbers land on those squares? Once you know them, the spiral has done its job and the question is pure prime-testing.
- Continuing the spiral outward, the diagonal through 7 carries the four shaded numbers 19, 23, 39, 47.
- Now test each for primeness. 39 jumps out: its digits add to 12 (a multiple of 3), so 39 = 3 × 13 is composite. The other three — 19, 23, 47 — are prime.
- So 3 of the four shaded numbers are prime. Worth keeping: the digit-sum test (digits add to a multiple of 3 ⇒ divisible by 3) is the fastest way to spot a non-prime here.
- Without filling the whole grid: on an n×n spiral the number n2 sits in the upper-left (n even) or lower-right (n odd) corner. So 9 is at lower-right of the 3×3 block, 25 at lower-right of 5×5, 49 at lower-right of 7×7; 16 at upper-left of 4×4, 36 at upper-left of 6×6.
- Walking outward from those anchors locates the four shaded squares as 19, 23, 39, 47 — with 39 = 3 × 13 the only composite.
2010 Β· #14 What is the sum of the prime factors of 2010?
What is the sum of the prime factors of 2010?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The trailing 0 gives 2010 = 201 × 10 = 2 · 5 · 201. For 201, its digits sum to 3, so 3 divides it: 201 = 3 · 67.
- 67 has no small factor (not even, not a multiple of 3 or 5, and 7·7 > 67 once you've ruled out 7) — so it's prime.
- Primes are 2, 3, 5, 67; sum = 77.
- Why this transfers: divisibility tests (even → 2, digit-sum → 3, ends in 0/5 → 5) let you factor by inspection. And you only test primes up to the square root before declaring what's left prime.
2025 Β· #23 How many four-digit numbers have all three of the following properties?The tens digit and ones digit are both 9.The number is 1 less...
How many four-digit numbers have all three of the following properties?
- The tens digit and ones digit are both 9.
- The number is 1 less than a perfect square.
- The number is the product of exactly two prime numbers.
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Decode the conditions instead of testing thousands of numbers. "Ends in 99" + 1 = ends in 00, and a square ending in 00 must be (10k)2. So the number is (10k)2 − 1 = (10k − 1)(10k + 1) — a difference of squares, factored for free.
- Four-digit size forces 10k ∈ {40, 50, 60, 70, 80, 90, 100}, just 7 cases.
- "Product of exactly two primes" now means both 10k − 1 and 10k + 1 are prime. Check: 39×41 (39 = 3×13, no), 49×51 (49 = 72, no), 59×61 (both prime ✓), 69×71 (69 = 3×23, no), 79×81 (81 = 34, no), 89×91 (91 = 7×13, no), 99×101 (99 = 9×11, no).
- Only 59 × 61 = 3599 survives, so exactly 1.
- Why this transfers: "one less than a perfect square" should instantly trigger the difference-of-squares factoring a2 − 1 = (a−1)(a+1) — turning a vague property into a concrete factorization you can prime-test.
Prime factorization β every integer's fingerprint
Hand 60 to ten different people and ask them to break it into primes. Someone starts 60 = 6×10, someone else 60 = 4×15, someone else 60 = 2×30. Different first steps — but keep going, and EVERY one of them lands on the exact same pile of primes: 2, 2, 3, 5. Always. That's not a coincidence; it's a law.
Every whole number ≥ 2 can be written as a product of primes in exactly one way (order doesn't matter). This is the Fundamental Theorem of Arithmetic — the most important fact in number theory.
So 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5, and that's the ONLY prime recipe for 60. Think of it as the number's fingerprint: no two numbers share one.
How to find the prime factorization (the “factor tree”): divide by the smallest prime that fits, write the factor, repeat with the quotient. Stop when you reach 1.
Read the leaves of the tree (the red primes at the bottom): 2, 2, 3, 7. So 84 = 2Β² Γ 3 Γ 7. You can also build a different-looking tree (split 84 as 4Γ21 first), but you'll always get the same primes at the leaves. That's the uniqueness theorem.
Why is this important? Because once you have the factorization, almost everything about the number becomes easy:
- Is it a perfect square? Yes if every prime's exponent is even. (36 = 2Β²Β·3Β² β yes.)
- How many divisors does it have? See chapter 4.
- Is it divisible by some target? Check if all the target's primes are in the fingerprint.
- What's the GCD or LCM with another number? See chapter 5.
360 = 2a × 3b × 5c. What is the sum of the exponents a + b + c?360 = 2³ × 3² × 5 and a + b + c = 3 + 2 + 1 = 6.For small numbers, start with the smallest prime (2) and divide repeatedly until it doesn't fit anymore, then move to 3, then 5, then 7. Write each step.
Walkthrough β factor 360:
- 360 Γ· 2 = 180
- 180 Γ· 2 = 90
- 90 Γ· 2 = 45 (now 45 is odd; 2 doesn't fit anymore)
- 45 Γ· 3 = 15
- 15 Γ· 3 = 5
- 5 is prime β stop.
So 360 = 2Β³ Γ 3Β² Γ 5.
Reading “is A a multiple of B?” straight off the fingerprints
Once you have both prime factorizations, you can answer “does B divide A?” without dividing. The rule is a quiet one but it’s everywhere: A is a multiple of B exactly when A’s fingerprint contains B’s — every prime in B, raised to at least as high a power.
Example. Is 1008 = 2⁴ · 3² · 7 a multiple of 72 = 2³ · 3²? Check each prime in 72: 2 appears to the 4th power in 1008 (need at least 3 — OK), 3 appears to the 2nd (need at least 2 — OK). Both met, so yes, 1008 is a multiple of 72 (1008 = 14 × 72). But 2916 = 2² · 3⁶ is NOT a multiple of 72: it has only two 2s, and 72 demands three.
Framing inspired by AoPS Prealgebra.
2⁴ · 3 · 5² a multiple of 2² · 3 · 5? Type 1 for yes, 0 for no.Ten people each factor 60. One writes 60 = 6 × 10, another 60 = 4 × 15, another 60 = 2 × 30. Different starting splits, so they’ll get different prime factorizations — the answer depends on how you start the tree.
Why it breaks: the Fundamental Theorem of Arithmetic says every integer has exactly one prime factorization. Keep going past those first splits and all three land on the same leaves: 2 × 2 × 3 × 5.
The fix: the FIRST split is your free choice; the FINAL primes are not. Any factor tree for a number ends on the same pile of primes — that pile is the number’s one true fingerprint.
What is the sum of the prime factors of 2010?
Find the sum of the prime factors of 2010.
Don't grind. Read the number: it ends in 0, so it's 201 × 10. And 10 = 2 × 5 — two primes for free.
Now crack 201. Its digits add to 2+0+1 = 3, a multiple of 3, so 3 divides it: 201 = 3 × 67.
Is 67 prime? √67 ≈ 8.2, so test 2, 3, 5, 7: it's odd, digit sum 13 (not ÷3), doesn't end in 0/5, and 67 ÷ 7 isn't whole. Prime.
So 2010 = 2 × 3 × 5 × 67. Sum of the primes: 2 + 3 + 5 + 67 = 77.
Always look at the number before you divide. A trailing 0 hands you 2 and 5 instantly; a digit sum divisible by 3 hands you a 3. Peel off the easy primes by sight, then you only have one small number left to test.
To factor: divide by the smallest prime that fits, repeat. Stop when you reach 1. The factorization is unique β write it as a product of prime powers.
2007 Β· #3 What is the sum of the two smallest prime factors of 250?
What is the sum of the two smallest prime factors of 250?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 250 ends in 0, which means it's divisible by both 2 and by 5 — the two smallest primes any number can have. So the two smallest are 2 and 5 with no work.
- Sum: 2 + 5 = 7.
- Why you can stop: 2 and 5 are the smallest two primes that exist, so once a number has both, nothing smaller can sneak in. (Fully, 250 = 2 · 53, but you never needed that.)
2009 Β· #6 The product of four different natural numbers is 100. What is the sum of the four numbers?
The product of four different natural numbers is 100. What is the sum of the four numbers?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 100 = 2^2 x 5^2. Using four different factors forces 1, 2, 5 and 10 (since 1x2x5x10 = 100).
- No other set of four distinct naturals multiplies to 100.
- Their sum is 1+2+5+10 = 18.
2013 Β· #10 For the positive whole numbers x, y, z the following is true: xΓy = 14, yΓz = 10 and zΓx = 35. What is the value of x + y + z?
For the positive whole numbers x, y, z the following is true: x×y = 14, y×z = 10 and z×x = 35. What is the value of x + y + z?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- (xy)(yz)(zx) = (xyz)Β² = 14 Γ 10 Γ 35 = 4900, so xyz = 70.
- x = xyz / yz = 70/10 = 7, y = 70/35 = 2, z = 70/14 = 5.
- x + y + z = 7 + 2 + 5 = 14.
2022 Β· #3 When three positive integers a, b, and c are multiplied together, their product is 100. Suppose a < b < c. In how many ways can the...
When three positive integers a, b, and c are multiplied together, their product is 100. Suppose a < b < c. In how many ways can the numbers be chosen?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Insight: since a < b < c, the smallest factor a is the natural thing to pin down — it's tiny (if all three were as big as a, the product a³ would already exceed 100). So a can only be a small factor of 100.
- a = 1: then bc = 100 with b < c — (1,2,50), (1,4,25), (1,5,20).
- a = 2: then bc = 50 with 2 < b < c — only (2,5,10).
- Bigger a leaves no room (e.g. a = 4 would need bc = 25 with 4 < b < c, impossible). That gives 4 valid triples.
- Why fix the smallest: in any “a < b < c, fixed product” problem, the smallest is squeezed into a short list, so looping over it is the fast, miss-nothing path.
- Since a < b < c and abc = 100, we get a3 < 100, so a ≤ 4. And a must be a factor of 100, so a ∈ {1, 2, 4}.
- For each: a = 1 gives (1,2,50), (1,4,25), (1,5,20); a = 2 gives (2,5,10); a = 4 gives nothing (would need bc = 25 with 4 < b < c).
- Total: 4 ways.
2023 Β· #22 In a sequence of positive integers, each term after the second is the product of the previous two terms. The sixth term in the sequence...
In a sequence of positive integers, each term after the second is the product of the previous two terms. The sixth term in the sequence is 4000. What is the first term?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Let the first two terms be a, b. Each new term multiplies the previous two, which adds their exponents — so the exponents climb like Fibonacci: a, b, ab, ab2, a2b3, a3b5.
- So the 6th term is a3b5 = 4000. Factor: 4000 = 4 × 1000 = 22 × (2×5)3 = 25 × 53. Matching the cube to a3 and the fifth power to b5 gives a = 5, b = 2.
- First term: 5. Sanity check: the sequence reads 5, 2, 10, 20, 200, 4000 — the 6th term hits 4000. Worth keeping: in any ‘multiply the previous two’ sequence, the exponents of the two starting values follow the Fibonacci numbers.
2020 Β· #24 Let N be the smallest positive number such that half of N is divisible by 2, one-third of N is divisible by 3, one-quarter of N is...
Let N be the smallest positive number such that half of N is divisible by 2, one-third of N is divisible by 3, one-quarter of N is divisible by 4, one-fifth of N is divisible by 5, one-sixth of N is divisible by 6, one-eighth of N is divisible by 8, and one-ninth of N is divisible by 9. The square root of N is a number of how many digits?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The clues say N is a multiple of 4, 9, 16, 25, 36, 64 and 81.
- Their least common multiple is N = 129600.
- √129600 = 360, which has 3 digits.
- The answer is 3, choice A.
Divisibility, primes, factorization
Three problems that fall to the divisibility rules and the factor tree.
2002 Β· #5 Carlos Montado was born on Saturday, November 9, 2002. On what day of the week will Carlos be 706 days old?
Carlos Montado was born on Saturday, November 9, 2002. On what day of the week will Carlos be 706 days old?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The weekday repeats every 7 days, so anything that's a multiple of 7 is invisible. Peel 706 into 700 + 6: those 700 days are exactly 100 weeks and land you right back on Saturday.
- Now just step 6 days past Saturday: Sun, Mon, Tue, Wed, Thu, Friday.
- *The reusable trick:* for any "what day/position after N steps" question with a cycle of length 7, only the *leftover* of N after pulling out whole cycles matters β break N into (multiple of 7) + (small remainder).
2007 Β· #3 What is the sum of the two smallest prime factors of 250?
What is the sum of the two smallest prime factors of 250?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 250 ends in 0, which means it's divisible by both 2 and by 5 — the two smallest primes any number can have. So the two smallest are 2 and 5 with no work.
- Sum: 2 + 5 = 7.
- Why you can stop: 2 and 5 are the smallest two primes that exist, so once a number has both, nothing smaller can sneak in. (Fully, 250 = 2 · 53, but you never needed that.)
2009 Β· #6 The product of four different natural numbers is 100. What is the sum of the four numbers?
The product of four different natural numbers is 100. What is the sum of the four numbers?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 100 = 2^2 x 5^2. Using four different factors forces 1, 2, 5 and 10 (since 1x2x5x10 = 100).
- No other set of four distinct naturals multiplies to 100.
- Their sum is 1+2+5+10 = 18.
Counting divisors β exponent + 1, multiplied
How many divisors does 1,000,000 have? Listing them would take all afternoon. But once you know its prime factorization, you can name the count — 49 — in one line, without writing a single divisor down. Here's the formula that does it.
DIVISOR COUNT FORMULA
If n = pa Β· qb Β· rc Β· β¦ (its prime factorization),
then the number of positive divisors of n is
(a+1)(b+1)(c+1) Β· β¦
Where does the +1 come from? Watch a divisor get BUILT. Every divisor is built by choosing how many copies of each prime to include. Take 40 = 2³ · 5. To build a divisor, you make two choices: how many 2s (you can take 0, 1, 2, or 3 — four options), and how many 5s (0 or 1 — two options).
Pick one box from the top row and one from the bottom row, and you've built a divisor. 2¹ · 5β° = 2, 2³ · 5¹ = 40, 2β° · 5β° = 1 — every combination is different, and there are 4 × 2 = 8 of them. The “+1” means “don't forget the option of taking ZERO of that prime.” That's why you count (3+1) twos and (1+1) fives, then multiply.
Example with 36. 36 = 2Β² Β· 3Β². For a divisor of 36, the exponent of 2 can be 0, 1, or 2 (three choices). The exponent of 3 can also be 0, 1, or 2 (three choices). Total divisors = 3 Γ 3 = 9.
Let's list them in a 3Γ3 grid to check:
3 rows Γ 3 columns = 9 divisors. Matches the (2+1)(2+1) formula.
Another example. How many divisors does 360 have? From chapter 3, 360 = 2Β³ Γ 3Β² Γ 5. So divisor count = (3+1)(2+1)(1+1) = 4 Γ 3 Γ 2 = 24 divisors.
Two patterns to spot in the divisor list
Pattern 1 — divisors come in pairs. Every divisor d of n has a partner n / d, which is also a divisor. The pair multiplies to n.
Try it. The divisors of 12 are 1, 2, 3, 4, 6, 12. Pair them up:
So the 6 divisors of 12 form 3 pairs. This is true in general: if n is NOT a perfect square, divisors pair up cleanly (count is always even).
See it with 40. List the pairs from the outside in — small factor on the left, its partner on the right — and they march toward the middle:
Now watch what's different about a perfect square. Do the same for 36, and the innermost pair turns out to be 6 × 6 — the two halves are the SAME number, so they fold into one:
That lone middle number is √36 = 6, pairing with itself. Every other divisor still comes in a clean pair, but that one stands alone — so a perfect square always has an ODD count, and every other number has an even count.
Pattern 2 — counting perfect-square divisors. A divisor of n is itself a perfect square exactly when each prime’s exponent (in the divisor) is even.
Example. How many perfect-square divisors does 360 = 2³ · 3² · 5 have? For each prime, count even-exponent choices:
- Exponent of 2 in the divisor: even choices are {0, 2}. 2 options.
- Exponent of 3: even choices are {0, 2}. 2 options.
- Exponent of 5: even choice is {0}. 1 option.
Total: 2 · 2 · 1 = 4 perfect-square divisors (they are 1, 4, 9, 36).
(2+1)(1+1)(1+1) = 3 × 2 × 2 = 12. The trap: forgetting that the primes 3 and 5 (exponent 1) each still contribute a factor of 2.Adding up the divisors — multiply the prime-power sums
Same idea as counting, but now you want the TOTAL of all the divisors, not only how many. Listing and adding works for small numbers, but it gets slow fast.
Slow way for 20. Divisors are 1, 2, 4, 5, 10, 20. Add: 1 + 2 + 4 + 5 + 10 + 20 = 42. Fine for 20. Painful for 360.
Here’s the shortcut. Factor: 20 = 2² × 5. Write a little sum for each prime — all its powers from p0 up to the top — then MULTIPLY the sums:
(1 + 2 + 4) × (1 + 5) = 7 × 6 = 42
Same 42, no listing. Why does multiplying work? When you expand (1 + 2 + 4)(1 + 5) the regular way, every term is one power of 2 times one power of 5 — and that’s exactly the recipe for a divisor. The grid below shows the expansion landing on all six divisors:
Read the cells: that's 1, 2, 4 across the top of each column times 1 or 5 — every divisor of 20 appears once, so adding them all is the same as multiplying the two bracket-sums.
SUM OF DIVISORS
If n = pa · qb · …, the sum of ALL its divisors is
(1 + p + … + pa) × (1 + q + … + qb) × …
One bracket per prime — list its powers, add, then multiply the brackets.
Bigger example. Sum of the divisors of 72 = 2³ · 3²: (1 + 2 + 4 + 8)(1 + 3 + 9) = 15 × 13 = 195. Try listing all twelve divisors of 72 and adding — you’ll get 195 too, the slow way.
(1 + 2 + 4)(1 + 3) = 7 × 4 = 28. Check by listing: 1 + 2 + 3 + 4 + 6 + 12 = 28. ✓Framing inspired by Competition Math for Middle School (AoPS).
Counting only the ODD divisors (or only the EVEN ones)
Sometimes a problem only wants the odd factors, or only the even ones. Don’t list and sort — the prime factorization splits them for you.
The key fact: a divisor is odd exactly when it has NO factor of 2. So to count odd divisors, cover up the power of 2 in the factorization and count the divisors of what’s left.
Example. How many odd divisors does 120 = 2³ · 3 · 5 have? Ignore the 2³ — the odd divisors come only from 3 · 5. Count those: (1+1)(1+1) = 4 (they are 1, 3, 5, 15).
And the EVEN divisors? Don’t count them one by one — subtract. Total divisors of 120: (3+1)(1+1)(1+1) = 16. Even ones = total − odd = 16 − 4 = 12. That’s complementary counting: count the easy set, subtract from the whole.
Framing inspired by Competition Math for Middle School (AoPS).
Perfect-square question? A number is a perfect square exactly when every prime in its factorization has an even exponent. So to make a number into a perfect square, multiply it by whatever's needed to bring all exponents up to even.
Example. What's the smallest positive integer we can multiply 72 by to get a perfect square? Factor: 72 = 2Β³ Γ 3Β². The exponent of 2 is 3 (odd), the exponent of 3 is 2 (even). To make 2's exponent even, multiply by one more 2. So multiply by 2: 72 Γ 2 = 144 = 12Β² β.
How many divisors does 48 = 2⁴ · 3 have? The exponents are 4 and 1. Multiply the exponents: 4 × 1 = 4 divisors.
Why it breaks: you forgot the “take ZERO of this prime” option for each prime — that’s the +1. Multiplying the raw exponents skips it entirely, and the lone prime 3 (exponent 1) silently contributes nothing.
The fix: add 1 to each exponent FIRST, then multiply: (4+1)(1+1) = 5 × 2 = 10 divisors. Check by listing: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 — ten. It’s (exponent + 1) per prime, multiplied — never the bare exponents.
How many positive factors of 36 are also multiples of 4?
How many positive factors of 36 are also multiples of 4?
Your instinct is to list all nine factors of 36 and check each for divisibility by 4. Resist it — there's a slicker move.
A number that is BOTH a factor of 36 AND a multiple of 4 already has the 4 built in. So write it as 4 × k. For that to divide 36, the leftover k must divide 36 ÷ 4 = 9.
So the question collapses to: how many factors does 9 have? 9 = 3², so by the formula it has (2+1) = 3 factors: 1, 3, 9.
Multiply each by 4: 4, 12, 36. That's 3 numbers — and you never listed all of 36's divisors.
“Count the multiples of d that also divide N” always becomes “count the factors of N ÷ d.” Pulling out the forced factor shrinks the problem, then the divisor-count formula finishes it.
Factor first. Then multiply (exponent + 1) for each prime. Don't forget primes with exponent 1 β they contribute a factor of 2.
2007 Β· #10 For any positive integer n, define [n] to be the sum of the positive factors of n. For example, [6] = 1 + 2 + 3 + 6 = 12. Find [[11]].
For any positive integer n, define [n] to be the sum of the positive factors of n. For example, [6] = 1 + 2 + 3 + 6 = 12. Find [[11]].
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Inner first: 11 is prime, so its only factors are 1 and 11 ⇒ [11] = 1 + 11 = 12.
- Now [12]. Pair up the divisors so none escape: 1·12, 2·6, 3·4 — that's {1, 2, 3, 4, 6, 12}.
- Add them: 1 + 2 + 3 + 4 + 6 + 12 = 28.
- Habit worth forming: finding divisors in multiply-to-n pairs guarantees a complete list — the same trick that makes counting factors fast.
2014 Β· #5 The product of two natural numbers is 36, and their sum is 37. What is the (positive) difference between the two numbers?
The product of two natural numbers is 36, and their sum is 37. What is the (positive) difference between the two numbers?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The factor pairs of 36 are 1Γ36, 2Γ18, 3Γ12, 4Γ9, 6Γ6.
- Their sums are 37, 20, 15, 13, 12 β only 1 and 36 give the sum 37.
- The difference is 36 β 1 = 35.
2022 Β· #3 When three positive integers a, b, and c are multiplied together, their product is 100. Suppose a < b < c. In how many ways can the...
When three positive integers a, b, and c are multiplied together, their product is 100. Suppose a < b < c. In how many ways can the numbers be chosen?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Insight: since a < b < c, the smallest factor a is the natural thing to pin down — it's tiny (if all three were as big as a, the product a³ would already exceed 100). So a can only be a small factor of 100.
- a = 1: then bc = 100 with b < c — (1,2,50), (1,4,25), (1,5,20).
- a = 2: then bc = 50 with 2 < b < c — only (2,5,10).
- Bigger a leaves no room (e.g. a = 4 would need bc = 25 with 4 < b < c, impossible). That gives 4 valid triples.
- Why fix the smallest: in any “a < b < c, fixed product” problem, the smallest is squeezed into a short list, so looping over it is the fast, miss-nothing path.
- Since a < b < c and abc = 100, we get a3 < 100, so a ≤ 4. And a must be a factor of 100, so a ∈ {1, 2, 4}.
- For each: a = 1 gives (1,2,50), (1,4,25), (1,5,20); a = 2 gives (2,5,10); a = 4 gives nothing (would need bc = 25 with 4 < b < c).
- Total: 4 ways.
2025 Β· #22 (figure problem)

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The setup is fiddly because the trailing gap isn't followed by a coat the way the inner gaps are. Patch it: drop a phantom coat on a 36th hook. Now the whole row is a flawless repeat of (some empty hooks)+(one coat), each block of length b ≥ 2.
- If there are d such blocks, bd = 36, and the real coat count is d − 1 (we added one phantom). The constraints are b ≥ 2 (each block has ≥ 1 empty + 1 coat) and d ≥ 2 (≥ 1 real coat plus the phantom).
- So just count factorizations 36 = b × d with both factors ≥ 2. Since 36 = 22 × 32 has (2+1)(2+1) = 9 divisors, and we drop the two using a 1 (1×36, 36×1), the answer is 9 − 2 = 7.
- Why this transfers: when boundary items spoil a repeating pattern, add (or remove) a phantom to restore the symmetry — the awkward "ends differ from the middle" complication melts into a clean periodic count.
2009 Β· #25 All factors of a number N (with the exception of 1 and N itself) are written down one after the other. It turns out that the biggest...
All factors of a number N (with the exception of 1 and N itself) are written down one after the other. It turns out that the biggest factor is 45 times as big as the smallest factor. For how many numbers N is that true?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The condition (largest proper factor) = 45 x (smallest proper factor) gives N/p = 45p, so N = 45 p^2.
- Because 45 = 3^2 x 5, N always has factor 3, so the smallest prime p can only be 2 or 3: p=2 gives N=180, p=3 gives N=405, both valid.
- Hence there are 2 such numbers.
2024 Β· #25 Dagobert wants to complete the diagram so that each box in the middle and top rows equals the product of the two boxes directly...
Dagobert wants to complete the diagram so that each box in the middle and top rows equals the product of the two boxes directly underneath it. Each box must contain a positive whole number, and he wants the top box to contain 36. How many different values can the number n have?

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- With bottom boxes x, n, y, the middle row is xn and ny, and the top is xn · ny = x·y·n² = 36.
- So n² must divide 36: n can be 1, 2, 3 or 6.
- Each choice leaves a valid positive product for x·y, so n has 4 possible values.
GCD and LCM β where things line up
Two more questions you can answer instantly from prime factorizations.
- The GCD (greatest common divisor) of two numbers is the biggest number that divides BOTH. GCD(12, 18) = 6.
- The LCM (least common multiple) of two numbers is the smallest number that’s a multiple of BOTH. LCM(12, 18) = 36.
Recipe (two rules)
Write each number’s prime factorization. For each prime, look at the two exponents:
| Which? | Take which exponent? | For 12 = 2² · 3 & 18 = 2 · 3² |
|---|---|---|
| GCD | SMALLER of the two | 2min(2,1) · 3min(1,2) = 21 · 31 = 6 |
| LCM | LARGER of the two | 2max(2,1) · 3max(1,2) = 22 · 32 = 36 |
The Venn picture — one diagram, two answers
Put 12’s primes in the left circle (2, 2, 3). Put 18’s primes in the right circle (2, 3, 3). The shared primes go in the MIDDLE.
Same two circles, two different questions. GCD is the shared overlap; LCM is everything together.
BEAUTIFUL IDENTITY (two numbers only)
GCD(a, b) × LCM(a, b) = a × b
Know one, get the other for free. Warning: this only works for TWO numbers; for three or more, it fails.
Where LCM matters most: when two cycles need to line up again. Bells at 4 and 6 minutes both ring together every LCM(4, 6) = 12 minutes. Lights flashing every 8 and 10 seconds sync every LCM(8, 10) = 40 seconds.
The Euclidean algorithm — GCD without factoring
What if the two numbers are HUGE and you don’t want to factor them? There’s a 2300-year-old shortcut (Euclid wrote it down). Replace the bigger number with its remainder when divided by the smaller. Repeat until one number is zero. The other is the GCD.
EUCLIDEAN ALGORITHM
gcd(a, b) = gcd(b, a mod b)
Keep replacing the bigger number with the leftover, until you hit 0.
Try it. What’s gcd(252, 105)?
- 252 ÷ 105 = 2 remainder 42. Now gcd(105, 42).
- 105 ÷ 42 = 2 remainder 21. Now gcd(42, 21).
- 42 ÷ 21 = 2 remainder 0. Stop.
The last non-zero number is 21. So gcd(252, 105) = 21. (Check: 252 = 21 · 12, 105 = 21 · 5 ✓.)
This is much faster than factoring 252 and 105 when the numbers get big. Most contest problems use small numbers where factoring is fine, but the algorithm is good to have in your back pocket.
Two remainders at once — find where they line up
LCM tells you when two cycles sync up exactly. Sometimes they line up at an offset instead. Here's the classic version:
Find the smallest positive whole number that leaves remainder 1 when divided by 6, and remainder 6 when divided by 11.
Don't set up equations. List each cycle and look for the first match.
- Remainder 1 when divided by 6:
1, 7, 13, 19, 25, 31, 37, 43, 49, 55, 61, … - Remainder 6 when divided by 11:
6, 17, 28, 39, 50, 61, …
The first number in both lists is 61. Done.
Here's the payoff: once you have one answer, the next ones come every LCM(6, 11) = 66. So the whole family is 61, 127, 193, … — start at 61, step by 66.
List the cycles, grab the first match, then step by the LCM.
The “one short” shortcut — when every remainder is divisor − 1
Some remainder problems collapse to one line if you spot the pattern. Here’s the classic:
Find the smallest whole number bigger than 1 that leaves remainder 5 when divided by 6, remainder 6 when divided by 7, and remainder 7 when divided by 8.
Don’t list anything. Notice each remainder is exactly one less than its divisor: 5 = 6−1, 6 = 7−1, 7 = 8−1. “One short of a clean multiple” is the same as saying n + 1 is a clean multiple. So n + 1 is divisible by 6, 7, AND 8 at once — that means n + 1 is a multiple of LCM(6, 7, 8).
LCM(6, 7, 8) = 168 (take 2³ from the 8, 3 from the 6, 7 from the 7). The smallest such n + 1 is 168, so n = 167. Check: 167 = 27×6 + 5 ✓, 167 = 23×7 + 6 ✓, 167 = 20×8 + 7 ✓.
n + 1 is divisible by 3, 4, and 5. LCM(3, 4, 5) = 60, so n = 60 − 1 = 59. Check: 59 = 19×3 + 2, 14×4 + 3, 11×5 + 4 ✓.Scaling — factor out the common piece
When two numbers share an obvious common chunk, pull it out FIRST. GCD and LCM both scale with it:
SCALING IDENTITIES
gcd(na, nb) = n · gcd(a, b) and lcm[na, nb] = n · lcm[a, b]
Multiplying both numbers by n multiplies both their GCD and their LCM by n.
See it small. 24 and 36 are both 12 times something: 24 = 12×2, 36 = 12×3. So gcd(24, 36) = 12 · gcd(2, 3) = 12 · 1 = 12, and lcm[24, 36] = 12 · lcm[2, 3] = 12 · 6 = 72. No factor tree needed.
See it big. What is lcm[606060, 707070]? Both are 10101 times something: 606060 = 10101 × 60, 707070 = 10101 × 70. Pull out the 10101: lcm = 10101 · lcm[60, 70]. Now 60 = 2²·3·5 and 70 = 2·5·7, so lcm[60, 70] = 2²·3·5·7 = 420. Thus lcm = 10101 × 420 = 4,242,420 — and you never factored the six-digit monsters.
Coprime shortcut — LCM is just the product
When two numbers share NO common factor (GCD 1, relatively prime), there’s no overlap to worry about, so their LCM is the whole product:
if gcd(a, b) = 1, then lcm[a, b] = a × b
For example lcm[8, 15] = 8 × 15 = 120 (8 = 2³, 15 = 3·5 — nothing shared). This also drops straight out of the identity gcd × lcm = a × b when the GCD is 1.
lcm[600, 900] by factoring out the common 300 first. (Hint: 600 = 300×2, 900 = 300×3.)lcm[600, 900] = 300 · lcm[2, 3]. Since 2 and 3 are coprime, lcm[2, 3] = 2 × 3 = 6, so lcm = 300 × 6 = 1800. (Check: 1800 = 600×3 = 900×2 ✓.)(Remainder problem adapted from Problem Solving via the AMC, Australian Maths Trust.)
If the question asks “when do two cycles meet again?” the answer is always LCM. If the question asks “what's the largest piece that fits both?” the answer is always GCD.
Memorize these mappings. Half the GCD/LCM problems you'll meet are one of these two patterns dressed up in a story.
Three bells ring every 15, 20, and 25 minutes. They rang together a moment ago. When do all three ring together again? Use the identity from above and multiply: 15 × 20 × 25 = 7500 minutes.
Why it breaks: two things go wrong. First, GCD × LCM = a × b works only for TWO numbers — it says nothing about three. Second, “ring together” means a COMMON multiple, and the first one is the least common multiple, not the product.
The fix: take the LCM the safe way — highest power of each prime. 15 = 3 · 5, 20 = 2² · 5, 25 = 5², so LCM = 2² · 3 · 5² = 300 minutes. The product 7500 is a common multiple, but it’s 25 times too big. “Meet again” is the LCM — build it prime by prime, never by multiplying the numbers.
The letters A, J, H, S, M, E and the digits 1, 9, 8, 9 are "cycled" separately as follows and put together in a numbered list:
AJHSME 1989
1. JHSMEA 9891
2. HSMEAJ 8919
3. SMEAJH 9198
.........What is the number of the line on which AJHSME 1989 will appear for the first time?
The 6 letters “AJHSME” come back to their original order every 6 cycles (one full cycle = 6 steps). The 4 digits “1989” come back every 4 cycles.
To make the combined string “AJHSME 1989” reappear, both cycles must finish at the same time. That happens at the smallest number that's a multiple of both 6 and 4 β that's the LCM.
LCM(6, 4) = 12.
So the original string first reappears at line 12.
This is the plain “two cycles must finish together” pattern. Don't try to write out the lines β recognize the pattern and apply LCM.
GCD β “shared / inside,” use smaller exponents. LCM β “alignment / outside,” use larger exponents. For cycle-meeting problems, it's always LCM.
2016 Β· #9 Alex has one rope 1Β m long and another 2Β m long. He cuts up both ropes so that all the pieces are of equal length. Which of the...
Alex has one rope 1 m long and another 2 m long. He cuts up both ropes so that all the pieces are of equal length. Which of the following numbers of pieces can he not obtain this way?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Equal pieces must divide both ropes exactly, so each piece is 1/n of a metre for some whole number n.
- Then the 1 m rope makes n pieces and the 2 m rope makes 2n pieces, for 3n pieces in all — always a multiple of 3.
- Among the options 6, 9, 12 and 15 are multiples of 3, but 8 is not, so 8 pieces cannot be obtained.
2013 Β· #10 For the positive whole numbers x, y, z the following is true: xΓy = 14, yΓz = 10 and zΓx = 35. What is the value of x + y + z?
For the positive whole numbers x, y, z the following is true: x×y = 14, y×z = 10 and z×x = 35. What is the value of x + y + z?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- (xy)(yz)(zx) = (xyz)Β² = 14 Γ 10 Γ 35 = 4900, so xyz = 70.
- x = xyz / yz = 70/10 = 7, y = 70/35 = 2, z = 70/14 = 5.
- x + y + z = 7 + 2 + 5 = 14.
2017 Β· #24 Mrs. Sanders has three grandchildren, who call her regularly. One calls her every three days, one calls her every four days, and one...
Mrs. Sanders has three grandchildren, who call her regularly. One calls her every three days, one calls her every four days, and one calls her every five days. All three called her on December 31, 2016. On how many days during the next year did she not receive a phone call from any of her grandchildren?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The three grandchildren realign every lcm(3, 4, 5) = 60 days, so the whole year is just copies of one 60-day block. Solving one block solves everything.
- Call days in 60 by inclusion–exclusion: 20 (÷3) + 15 (÷4) + 12 (÷5) − 5 (÷12) − 4 (÷15) − 3 (÷20) + 1 (÷60) = 36. So no-call days = 60 − 36 = 24 per block.
- The year is 365 = 6×60 + 5 days. The six full blocks give 6 × 24 = 144 no-call days.
- Handle the 5 leftover days (days 361–365, which restart the cycle as days 1–5): day 1 no, day 2 no, day 3 call, day 4 call, day 5 call — 2 more no-call days.
- Total: 144 + 2 = 146.
- Why this transfers: periodic-event problems collapse to one lcm-length cycle; inclusion–exclusion handles the overlaps, and the only care needed is the partial cycle at the end.
2024 Β· #22 Daniel wants to cut a rope into 12 equal pieces and marks the places where he has to cut. Mohammed wants to cut the same rope into 16...
Daniel wants to cut a rope into 12 equal pieces and marks the places where he has to cut. Mohammed wants to cut the same rope into 16 equal pieces and marks his cuts as well. Maya finally cuts the rope at all the marked spots. How many pieces does Maya get?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Daniel makes 11 marks (at 1/12, 2/12, β¦, 11/12) and Mohammed makes 15 marks (at 1/16, β¦, 15/16).
- Marks coincide where the positions match, which happens at 1/4, 1/2 and 3/4 β that is 3 shared marks.
- Distinct cut points: 11 + 15 β 3 = 23.
- Cutting at 23 points gives 23 + 1 = 24 pieces.
2019 Β· #21 n buttons are placed evenly around a circle. The buttons are labelled clockwise in order with the numbers 1 to n. The button numbered 7...
n buttons are placed evenly around a circle. The buttons are labelled clockwise in order with the numbers 1 to n. The button numbered 7 is exactly opposite the button numbered 23. How big is n?

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- If buttons 7 and 23 are exactly opposite, they are n/2 positions apart.
- The gap from 7 to 23 is 23 − 7 = 16, so n/2 = 16.
- Therefore n = 32.
2011 Β· #20 10 children are at a judo club. Their teacher has 80 sweets. If he gives each girl the same amount of sweets, there are three sweets...
10 children are at a judo club. Their teacher has 80 sweets. If he gives each girl the same amount of sweets, there are three sweets left over. How many boys are at the club?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- After 3 are left over, 80 β 3 = 77 sweets are shared equally among the girls.
- 77 splits evenly only into 7 groups of 11 (or 11 groups of 7), and only 7 girls fits a club of 10, so there are 7 girls.
- Then boys = 10 β 7 = 3.
Digit sums β the divisibility-by-9 fingerprint
The digit sum of a number is what you get when you add its digits.
- Digit sum of 1234 = 1+2+3+4 = 10.
- Digit sum of 999 = 9+9+9 = 27.
- Digit sum of 50 = 5+0 = 5.
Already we used this in chapter 1: for divisibility by 3 or 9, the digit sum tells you the answer. But there's a deeper fact:
DIGIT SUM β‘ NUMBER (mod 9)
The remainder of any number when divided by 9 is the same as the remainder of its digit sum when divided by 9.
This is why the divisibility rule for 9 works. And it gives a quick trick called casting out nines: if you keep adding the digits of the digit sum, you eventually get a single digit β that's the original number's remainder mod 9 (or 9 itself if the original was a multiple of 9). Adults used this for centuries before calculators to check their arithmetic.
Example. What's 1234 mod 9? Digit sum: 1+2+3+4 = 10. Digit sum again: 1+0 = 1. So 1234 β‘ 1 (mod 9). Check: 1234 = 137Β·9 + 1 β.
Casting out nines for an arithmetic check. If 472 + 351 = 823, the digit sums should match too: 4+7+2 = 13 β 4; 3+5+1 = 9 β 9 (which is 0 mod 9); 4 + 0 = 4. And 8+2+3 = 13 β 4. Both sides give 4 β. (If they hadn't matched, you'd know you had an arithmetic mistake.)
Place value — what each digit is really worth
A digit sum throws away WHERE each digit sits. But a lot of contest problems are about exactly that — the position. The number 358 is not “3 and 5 and 8.” It’s
That “break it into place pieces” move is the whole idea. A two-digit number with tens digit a and ones digit b is 10a + b. A three-digit number is 100a + 10b + c. Write it that way and the position does the work.
Biggest number? Biggest digit in the highest seat.
You’re handed some digits and asked for the LARGEST number you can build. A spot worth 100 beats a spot worth 10, which beats a spot worth 1. So the biggest digit should grab the most valuable seat.
Palindromes and reversing digits
A palindrome reads the same forwards and backwards: 121, 3443, 7. Build one from the outside in — the first and last digit must match, then the next pair in, and so on.
And here’s a slick fact about reversing a two-digit number. The number is 10a + b; its reversal is 10b + a. Add them: 10a + b + 10b + a = 11(a + b). Reversal-sums are always multiples of 11. Subtract instead and you get 9(a − b) — always a multiple of 9. Place value turns “reverse the digits” into clean algebra.
WORKED EXAMPLE — kangaroo-2025-kadett-01
Lisa makes 2025 out of four wooden digits: 2, 0, 2, 5. What is the LARGEST number she can build from those same four digits?
Don’t shuffle randomly. Use the rule: biggest digit in the highest seat. Sort 2, 0, 2, 5 from large to small: 5, 2, 2, 0.
Read it off: 5220. (The 0 has to land in the ones seat — the least valuable spot — which is exactly where the smallest digit belongs.)
Place value means each seat has a weight. Put your biggest digit where the weight is biggest.
Cryptarithms — when letters stand for digits
Some puzzles hide the digits behind letters or boxes: ABC + CBA = DDDD, or ?? × ? = 176. The rule is always the same — different letters are different digits, the same letter is the same digit every time. Your instinct is to try random digits. Resist it. Use place value plus one toehold fact.
The toehold: a repeated-digit number is a multiple. dd = 11d (so 44 = 11×4). aba-style and abab-style numbers hide a factor too (abab = ab × 101). Spotting that one factor usually cracks the puzzle.
Warm-up. The SAME digit fills every box: ?? × ? = 176. Call it d. The two-digit box ?? is dd = 11d, so 11d × d = 176, i.e. 11d² = 176. Divide: d² = 16, so d = 4. Check: 44 × 4 = 176 ✓. The hidden factor 11 cracked it instantly.
WORKED EXAMPLE — kangaroo-2010-benjamin-22
In PPQ × Q = RQ5Q, the letters P, Q, R are three different digits. Find P + Q + R.
Start at the ONES column — it leaks the most. The last digit of Q × Q has to be Q again. Run through digits: only 6 × 6 = 36 ends in 6 (and gives a four-digit product), so Q = 6.
Now the number is PP6 × 6 and the result looks like R656. Test the few PP6 values: 776 × 6 = 4656 — that fits R656 with R = 4. So P = 7, Q = 6, R = 4.
P + Q + R = 7 + 6 + 4 = 17.
Different letters = different digits. Pin the units column first, then let place value finish it.
When a problem asks for a missing digit to make a number divisible by 9 (or 3), use digit sums directly.
Example: “What digit ? makes 724? divisible by 9?” Digit sum = 7+2+4+? = 13 + ?. We need 13 + ? to be a multiple of 9. The closest multiple of 9 β₯ 13 is 18. So ? = 5. (The next, 27, would need ? = 14 β not a digit.) Check: 7245 = 9 Γ 805 β.
When Yunji added all the integers from 1 to 9, she mistakenly left out a number. Her incorrect sum turned out to be a square number. What number did Yunji leave out?
Yunji adds the integers 1 through 9 but accidentally leaves one out. Her wrong sum turns out to be a perfect square. Which number did she leave out?
Your instinct is to test all nine cases. Lighter path: find the FULL total first, then the answer is that total minus one small number.
The full sum 1 + 2 + … + 9 pairs up nicely: 1+9, 2+8, 3+7, 4+6 are four 10s, plus a lonely 5 — that's 45.
Dropping one number (1 to 9) leaves a sum somewhere between 45 − 9 = 36 and 45 − 1 = 44. Which perfect square lives in 36–44? Only 36 = 6² (the next square, 49, is too big).
So the leftover sum was 36, and the missing number is 45 − 36 = 9.
When something is “almost” a number you know, compute the whole thing once, then handle the small correction. The digit-sum/pairing habit gives you 45 instantly, and the perfect-square window does the rest — no nine-case grind.
For divisibility by 9 (or 3), use digit sums. The remainder mod 9 equals the digit sum's remainder mod 9. Repeated digit-summing gives the digital root.
2001 Β· #4 The digits 1, 2, 3, 4, and 9 are each used once to form the smallest possible even five-digit number. The digit in the tens place is
The digits 1, 2, 3, 4, and 9 are each used once to form the smallest possible even five-digit number. The digit in the tens place is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The most-significant digits control size most, so we want 1, 2, 3 up front. That parks 4 and 9 in the last two slots.
- But the number must be even, so the units digit is the even one of {4, 9} β that's 4. The 9 is forced into the tens place: 12394.
- So the tens digit is 9. The lesson: when a constraint (here "even") locks one position, honor it first, then greedily minimize the rest left-to-right.
2002 Β· #4 The year 2002 is a palindrome (a number that reads the same from left to right as it does from right to left). What is the product of...
The year 2002 is a palindrome (a number that reads the same from left to right as it does from right to left). What is the product of the digits of the next year after 2002 that is a palindrome?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Key idea: you only get to *choose* the first half of a palindrome β the back half is its mirror. Keep the leading 2 (raising it overshoots wildly), so the year is 2 ? ? 2.
- The middle two digits must be equal. "00" gives 2002 (not *after*), so the next-smallest equal pair is "11" β 2112. Its digit product is 2 × 1 × 1 × 2 = 4.
- *This transfers:* to find the next palindrome, only nudge the first half upward and mirror it β you never have to scan years one by one.
2014 Β· #5 What is the difference between the smallest five-digit number and the biggest four-digit number?
What is the difference between the smallest five-digit number and the biggest four-digit number?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The smallest five-digit number is 10000 and the largest four-digit number is 9999.
- These are consecutive whole numbers, so their difference is 1.
2022 Β· #3 Beate arranges five cards β 4, 8, 31, 59 and 107 β side by side to make the smallest possible nine-digit number. Which card ends up...
Beate arranges five cards — 4, 8, 31, 59 and 107 — side by side to make the smallest possible nine-digit number. Which card ends up furthest to the right?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The five cards start with the digits 1 (107), 3 (31), 4 (4), 5 (59) and 8 (8).
- For the smallest number these leading digits must read in increasing order from left to right, so the cards go 107, 31, 4, 59, 8, giving 107314598.
- The card furthest to the right is 8, so the answer is B.
2018 Β· #21 Three different digits A, B, and C are chosen. Then the biggest possible six-digit number is built in which the digit A appears 3 times,...
Three different digits A, B, and C are chosen. Then the biggest possible six-digit number is built in which the digit A appears 3 times, the digit B 2 times, and the digit C 1 time. Which arrangement is definitely not possible for this number?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- To make the number as big as possible you write its six digits from largest to smallest, so going left to right the digits never increase.
- Then the two B's must sit side by side: any letter caught between them would have to be no bigger than B (to its left) yet no smaller than B (to its right), so it would equal B - impossible, since the digits are all different.
- In AAABCB the C sits between the two B's, which can never happen.
- Every other option keeps the two B's together, so the impossible one is AAABCB.
2020 Β· #26 A three-digit number is called balanced if its middle digit is the average of the other two digits. How many balanced numbers are...
A three-digit number is called balanced if its middle digit is the average of the other two digits. How many balanced numbers are divisible by 18?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Balanced means middle = (first+last)/2, so the digit sum first+middle+last = 3 x middle.
- Divisible by 9 needs that sum divisible by 9, so the middle digit is 0, 3, 6 or 9; divisible by 2 needs an even last digit.
- Listing the cases gives 234, 432, 468, 630, 666, 864 - exactly 6 numbers.
Divisors, GCD/LCM, digit sums
Three problems that need the divisor formula or a digit-sum check.
2007 Β· #10 For any positive integer n, define [n] to be the sum of the positive factors of n. For example, [6] = 1 + 2 + 3 + 6 = 12. Find [[11]].
For any positive integer n, define [n] to be the sum of the positive factors of n. For example, [6] = 1 + 2 + 3 + 6 = 12. Find [[11]].
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Inner first: 11 is prime, so its only factors are 1 and 11 ⇒ [11] = 1 + 11 = 12.
- Now [12]. Pair up the divisors so none escape: 1·12, 2·6, 3·4 — that's {1, 2, 3, 4, 6, 12}.
- Add them: 1 + 2 + 3 + 4 + 6 + 12 = 28.
- Habit worth forming: finding divisors in multiply-to-n pairs guarantees a complete list — the same trick that makes counting factors fast.
2016 Β· #9 Alex has one rope 1Β m long and another 2Β m long. He cuts up both ropes so that all the pieces are of equal length. Which of the...
Alex has one rope 1 m long and another 2 m long. He cuts up both ropes so that all the pieces are of equal length. Which of the following numbers of pieces can he not obtain this way?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Equal pieces must divide both ropes exactly, so each piece is 1/n of a metre for some whole number n.
- Then the 1 m rope makes n pieces and the 2 m rope makes 2n pieces, for 3n pieces in all — always a multiple of 3.
- Among the options 6, 9, 12 and 15 are multiples of 3, but 8 is not, so 8 pieces cannot be obtained.
2011 Β· #21 The five-digit number 24X8Y is divisible by 4, 5 and 9. What is the sum of X and Y?
The five-digit number 24X8Y is divisible by 4, 5 and 9. What is the sum of X and Y?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Divisible by 5 means Y is 0 or 5; divisible by 4 needs the last two digits 8Y divisible by 4, forcing Y = 0.
- Divisible by 9 means 2+4+X+8+0 = 14+X is a multiple of 9, so X = 4.
- Then X + Y = 4 + 0 = 4.
Units digit cycles β what big powers end in
What's the last digit of 2 to the 100th power? That number has 31 digits — no calculator you own will show it. And yet you can name its final digit in about five seconds, because the last digit of a power doesn't wander. It marches in a tiny loop.
Watch the powers of 2 and keep only the LAST digit:
Only the last digit matters: 2, 4, 8, 6, 2, 4, 8, 6, β¦ repeating forever in groups of 4. So we say “powers of 2 have units-digit period 4.”
The strip above is really a loop bent straight. Coil it back up and you get a little wheel — each time you raise the power by one, you take one step clockwise:
So “what does 2ⁿ end in?” becomes “where do you land after n steps around a 4-spot wheel?” — and that's exactly n mod 4. The wheel is why the exponent only matters as its leftover.
The other cycles you should know cold:
UNITS-DIGIT CYCLES
- 2: 2, 4, 8, 6 (period 4)
- 3: 3, 9, 7, 1 (period 4)
- 4: 4, 6 (period 2)
- 5: always 5
- 6: always 6
- 7: 7, 9, 3, 1 (period 4)
- 8: 8, 4, 2, 6 (period 4)
- 9: 9, 1 (period 2)
- 0, 1, 5, 6: stuck (period 1 β they don't change)
How to find the units digit of an:
- Keep only the units digit of
a. - Look up its cycle (above).
- Find which spot in the cycle
nlands on by computingn mod (cycle length).
Example. Units digit of 3β·? Cycle of 3 has period 4. 7 mod 4 = 3. So we want the 3rd entry of the cycle 3, 9, 7, 1 β that's 7. (Check: 3β· = 2187 β.)
Example. Units digit of 7ΒΉβ°β°? Cycle of 7 has period 4. 100 mod 4 = 0, which means the last entry of the cycle (the 4th). Cycle of 7 is 7, 9, 3, 1. Last entry is 1.
223?Be careful with the indexing. If n mod 4 = 0, that's the 4th spot in the cycle (the end), not the 0th. Many students get this off by one. The cleanest rule: if cycle length is 4, then n=1 uses the 1st entry, n=2 the 2nd, n=3 the 3rd, n=4 the 4th, n=5 the 1st again, etc.
What is the ones digit of
The expression is 222,222 β 22,222 β 2,222 β 222 β 22 β 2. Only the ones digit matters.
The five numbers being subtracted (22222, 2222, 222, 22, 2) all end in 2. So the sum of their ones digits is 5 Γ 2 = 10.
Subtracting a number that ends in 0 (a multiple of 10) from 222,222 doesn't change its ones digit. So the ones digit of the answer is the same as the ones digit of 222,222 β which is 2.
The trick: focus only on the ones-digit column. The total amount being subtracted (in the ones column) is 10, which carries over and leaves a 0. So the original 2 stays. Don't compute the full 5-digit subtractions.
For large powers, find the units-digit cycle and reduce the exponent mod the cycle length. Memorize the cycles for 2, 3, 7, 8 (period 4); 4 and 9 (period 2); 0, 1, 5, 6 (stuck).
2009 Β· #2 Which of the following numbers is even?
Which of the following numbers is even?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 2009 is odd; 2+0+0+9 = 11 is odd; 200β9 = 191 is odd; 200+9 = 209 is odd.
- 200 Γ 9 = 1800, which is even.
- So the even one is 200 Γ 9 β answer D.
2009 Β· #1 Which of the following is an even number?
Which of the following is an even number?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 2009 is odd; 2+0+0+9=11 is odd; 200-9=191 is odd; 200+9=209 is odd.
- Only 200x9=1800 is even, since 200 already carries a factor of 2.
- So the even number is 200 x 9.
2011 Β· #15 How many digits are in the product 45 Β· 510?
How many digits are in the product 45 · 510?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Rewrite 45 as a power of 2: 45 = (22)5 = 210. Now you have ten 2's and ten 5's.
- Each 2 pairs with a 5 to make a 10: 210 · 510 = (2·5)10 = 1010.
- 1010 is a 1 followed by ten zeros — that's 11 digits (the 1 plus 10 zeros, not 10).
- Worth keeping: a stack of 2's times a stack of 5's always collapses into a power of 10. Watch the off-by-one: 10n has n+1 digits.
1999 Β· #24 When 19992000 is divided by 5, the remainder is
When 19992000 is divided by 5, the remainder is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Dividing by 5 only cares about the last digit (10, 20, 30, β¦ are all multiples of 5), and the last digit of a power only depends on the base's last digit, 9.
- Powers of 9 cycle in their units digit: 9, 81, 729, β¦ β 9, 1, 9, 1, β¦ Odd exponent β ends in 9, even exponent β ends in 1. Since 2000 is even, 1999Β²β°β°β° ends in 1.
- A number ending in 1 is one more than a multiple of 10 (hence of 5), so the remainder is 1. The transferable idea: for last-digit or mod-5/mod-10 questions, ignore the giant number and ride the short repeating cycle of units digits.
- Modulo 5, 1999 leaves remainder 4 (since 2000 is a multiple of 5), so 1999Β²β°β°β° β‘ 4Β²β°β°β° (mod 5).
- And 4 β‘ β1 (mod 5), so 4Β²β°β°β° β‘ (β1)Β²β°β°β° = 1 (mod 5).
- The remainder is 1. Spotting that the base is β1 away from a multiple of 5 makes an even power collapse to 1 instantly β a clean trick once you've met modular arithmetic.
1997 Β· #25 All the even numbers from 2 to 98 inclusive, except those ending in 0, are multiplied together. What is the units digit of the product?
All the even numbers from 2 to 98 inclusive, except those ending in 0, are multiplied together. What is the units digit of the product?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Excluding multiples of 10, each block of ten (2,4,6,8 then 12,14,16,18 β¦) contributes the units digits 2, 4, 6, 8. Their product ends like 2 Γ 4 Γ 6 Γ 8 = 384, i.e. units digit 4.
- From 2 to 98 there are 10 such blocks, so the overall units digit is that of 4ΒΉβ°.
- Powers of 4 cycle 4, 6, 4, 6, β¦: 4Β² = 16 ends in 6, and any power of 6 ends in 6, so 4ΒΉβ° = (4Β²)β΅ ends in 6.
- You'll see it again: units digits of nβΏ-style products are tamed by (1) keeping only units digits and (2) exploiting their short repeating cycle β never multiply the giant number out.
1994 Β· #25 Find the sum of the digits in the answer to9999β¦9994 ninesΓ4444β¦4494 fourswhere a string of 94 nines is multiplied by a string of 94 fours.
Find the sum of the digits in the answer to
where a string of 94 nines is multiplied by a string of 94 fours.
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Do the small versions and total the digits: 9Β·4 = 36 (digit sum 9), 99Β·44 = 4356 (sum 18), 999Β·444 = 443556 (sum 27). Each extra nine adds exactly 9 to the digit sum, so the rule is: digit sum = 9 Γ (number of nines).
- With 94 nines, the digit sum is 9 Γ 94 = 846.
- Why it grows by a steady 9: look at 999Β·444 = 443556 β it's a run of 4s, then a 3, then a run of 5s, then a 6. Adding one more nine lengthens the 4-run AND the 5-run by one digit each, so the digit sum climbs by 4 + 5 = 9 every time. With 94 nines the product is 93 fours, a 3, 93 fives, a 6, giving 4Β·93 + 3 + 5Β·93 + 6 = 9Β·94 = 846. The reusable move: when a number is too huge to compute, test the smallest cases, check the step between them is constant, then leap to the big case.
- Sanity check on the pattern: the all-nines factor is a multiple of 9, so the product is too β and a multiple of 9 always has a digit sum that's a multiple of 9. Our 846 = 9 Γ 94 passes, while the only non-multiple-of-9 choice (1072) can be ruled out on sight. (Several choices ARE multiples of 9, so this test confirms 846 is legal but doesn't pick it alone β the small-case rule is what pins down the exact value.)
- A string of 94 nines equals 10βΉβ΄ β 1, so the product is (10βΉβ΄ β 1)Β·(444β¦4) = (444β¦4 with 94 zeros tacked on) β (444β¦4). Subtracting the 94-digit string of 4s from that shifted copy borrows down the line and lands on 93 fours, a 3, 93 fives, a 6 β exactly the shape the small cases predicted.
- Its digit sum is 4Β·93 + 3 + 5Β·93 + 6 = 372 + 3 + 465 + 6 = 846. Turning 99β¦9 into 10βΏ β 1 is the standard trick that explains WHY these repeated-digit products come out so regular.
Parity β the simplest mod, and the deepest
Parity is one word for “is this number even or odd?” The simplest math fact in the universe — but on a contest, it’s a superpower.
The combination rules — two tables
When you ADD or MULTIPLY two numbers, the result’s parity is determined by the parities of the pieces. Memorize:
| + | even | odd |
|---|---|---|
| even | even | odd |
| odd | odd | even |
| × | even | odd |
|---|---|---|
| even | even | even |
| odd | even | odd |
1 + 2 + 3 + 4 + 5 + 6 + 7 odd or even? Type 1 for odd, 0 for even.Where parity wins on a contest
- “Is X even or odd?” Track parity through the operations — you don’t need the actual value.
- “Odd number = sum of two primes”: one prime MUST be 2 (the only even prime).
- Counting moves on a grid. Each step flips parity. A square at distance 5 requires 5, 7, 9, … moves — never an even count.
- “Sum of n consecutive integers is even/odd?” Just count how many odd terms are in the list.
Whole-number equations — isolate, then list
Some problems hand you an equation like 3x + 5y = 31 and tell you x and y are whole numbers (often counts of things, so they can't be negative). One equation, two unknowns — in regular algebra that has infinitely many answers. But “whole numbers only” changes everything. Now there are only a handful.
Your instinct is to guess pairs at random. Resist it. Here's the clean method.
- Isolate one variable. Solve for whichever one is easier:
5y = 31 − 3x, soy = (31 − 3x) ÷ 5. - Walk x up from 0 and keep only the x-values that make the top a clean multiple of 5 (so y comes out whole).
- Stop the moment y would go negative.
Walk it: x = 0 → 31÷5, not whole. x = 1 → 28÷5, no. x = 2 → 25÷5 = 5 ✓. x = 3 → 22÷5, no. x = 4 → 19÷5, no. x = 5 → 16÷5, no. x = 6 → 13÷5, no. x = 7 → 10÷5 = 2 ✓. x = 8 → 7÷5, no. x = 9 → 4÷5, no. x = 10 → 3x = 30, only 1 left, not a multiple of 5; x = 11 makes 3x = 33 > 31, so y goes negative — stop.
Two solutions: (x, y) = (2, 5) and (7, 2). Notice the winning x-values jumped by 5 each time (2, then 7). That's not luck: once you find one, the next comes every 5 steps in x (the coefficient of y). Isolate one variable, list the whole-number hits, stop when it goes negative.
(Listing method adapted from Problem Solving via the AMC, Australian Maths Trust.)
Coin and ticket problems — build the equation first
Coin and ticket word problems all hide the same shape: so many things, this much total value. The hard part isn't the math — it's writing the equation.
Watch how a count condition and a value condition combine. You have 12 coins, all dimes (10¢) and quarters (25¢), worth $1.80 in all. How many of each?
Let d = dimes. Then quarters = 12 − d (the count uses up all 12 coins — that's the trick beginners miss). Now the value, in cents:
10d + 25(12 − d) = 180
Expand: 10d + 300 − 25d = 180, so −15d = −120, giving d = 8. So 8 dimes and 4 quarters. Check: 8×10 + 4×25 = 80 + 100 = 180¢ = $1.80 ✓.
The whole game: name ONE unknown, write the other count as “total minus that,” then turn the money into one equation. Count condition fixes the other variable; value condition gives the equation.
(Coin-problem setup adapted from Problem Solving via the AMC, Australian Maths Trust.)
“How many solutions?” — count without listing
Sometimes the question isn't “find x and y” — it's “how MANY whole-number pairs work?” If the count is big, listing every one is slow and you'll lose track. There's a faster way.
How many pairs of positive whole numbers (x, y) satisfy 2x + 7y = 100?
Isolate the variable with the BIGGER coefficient — it grows fastest, so it has the fewest legal values. Solve for y: 7y = 100 − 2x. For y to be a whole number, 100 − 2x must be a multiple of 7.
Find the first hit: x = 1 gives 100 − 2 = 98 = 7×14 ✓, so (1, 14) works. After that, x jumps by 7 each time (the y-coefficient) and y drops by 2: (1,14), (8,12), (15,10), (22,8), (29,6), (36,4), (43,2). The next, x = 50, forces y = 0 — not positive, so stop.
That's 7 solutions — and you found them by stepping, not by checking all 50 values of x. Once the first solution and the step size are known, you can even count by arithmetic: x runs 1, 8, …, 43, which is (43 − 1) ÷ 7 + 1 = 7 values. Find one solution, learn the step, then count — don't grind out the whole list.
(Solution-counting adapted from Problem Solving via the AMC, Australian Maths Trust.)
Whenever a problem asks “is X even or odd?” or “find an arrangement where the sum is even,” parity is your first move. The result's parity is determined by the structure (how many odds you add, how many evens you multiply), not by the actual values.
Tiny example. Is 3 Γ 5 Γ 7 Γ 9 Γ 11 even or odd? All five factors are odd. odd Γ odd = odd, so multiplying any number of odd numbers gives odd. Answer: odd. (No need to compute β 3Β·5Β·7Β·9Β·11 = 10395, ends in 5, an odd number.)
Suppose m and n are positive odd integers. Which of the following must also be an odd integer?
m and n are positive ODD integers. Which of these MUST be odd: (A) m + 3n, (B) 3m − n, (C) 3m² + 3n², (D) (nm + 3)², (E) 3mn?
Don't plug in numbers. Track only odd/even. Since 3 is odd and odd×odd = odd, every piece like 3n, 3m, 3mn is odd.
Now scan for the killer move — odd + odd = even and odd − odd = even. Any choice that adds or subtracts two odds collapses to even:
- (A) odd + odd = even.
- (B) odd − odd = even.
- (C) odd + odd = even.
- (D) inside is odd + odd = even, and even² = even.
- (E)
3mn= odd × odd × odd = odd — no addition to spoil it.
Only (E) survives. The answer is 3mn.
Parity isn't only for prime problems. When everything is built from odds, the trap is always a hidden “odd ± odd” turning the whole thing even. The one expression that's a pure product stays odd. You never computed a single value.
For “odd vs. even” questions, track parity through the operations. For “sum of two primes” problems where the sum is odd, one prime is forced to be 2.
2009 Β· #1 Which of the following is an even number?
Which of the following is an even number?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 2009 is odd; 2+0+0+9=11 is odd; 200-9=191 is odd; 200+9=209 is odd.
- Only 200x9=1800 is even, since 200 already carries a factor of 2.
- So the even number is 200 x 9.
2024 Β· #5 Aaliyah rolls two standard 6-sided dice. She notices that the product of the two numbers rolled is a multiple of 6. Which of the...
Aaliyah rolls two standard 6-sided dice. She notices that the product of the two numbers rolled is a multiple of 6. Which of the following integers cannot be the sum of the two numbers?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The insight: "multiple of 6" means "has a factor 2 AND a factor 3." So the pair must contain at least one even number AND at least one 3 or 6. That's the only condition — no need to multiply anything out.
- Now test each sum. Sum 6 can only be (1,5), (2,4), or (3,3). Check: (1,5) has no even-and-3, (2,4) has no 3 or 6, (3,3) has a 3 but no even number. None qualify — so a sum of 6 is impossible.
- Every other choice does have a qualifying pair: 5 = (2,3), 7 = (1,6), 8 = (2,6), 9 = (3,6). Answer: 6. This transfers: to test divisibility by a composite like 6, 12, or 15, split it into prime factors and check each one separately.
- Pairs whose product is a multiple of 6 (need a multiple of 3 and an even number): (1,6), (2,3), (2,6), (3,6), (4,6), (5,6), (6,6).
- Their sums: 7, 5, 8, 9, 10, 11, 12. Among A–E, only 6 is missing.
2014 Β· #4 The sum of two prime numbers is 85. What is the product of these two prime numbers?
The sum of two prime numbers is 85. What is the product of these two prime numbers?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 85 is odd. Odd + odd = even and even + even = even, so to get an odd sum exactly one prime must be even.
- The only even prime is 2, so that prime is 2; the other is 85 − 2 = 83 (prime — check).
- Product: 2 × 83 = 166.
- Why this transfers: "even prime" almost always means just "2". Watch the parity of a sum and you can often nail one number before doing any real work.
2017 Β· #29 Sarah wants to write a positive whole number onto every tile in the number wall shown, so that every number is equal to the sum of the...
Sarah wants to write a positive whole number onto every tile in the number wall shown, so that every number is equal to the sum of the two numbers on the tiles that are directly below it. What is the maximum number of odd numbers Sarah can write on the tiles?

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- With 15 tiles (rows of 5, 4, 3, 2, 1), each upper tile is odd exactly when the two below it differ in parity.
- Searching parity patterns for the bottom row, the most odd tiles achievable across the whole wall is 10.
- So the maximum number of odd tiles is 10.
2018 Β· #23 Nick wants to split the numbers 2, 3, 4, 5, 6, 7, 8, 9, 10 into some groups so that the sum of the numbers in each group is the same....
Nick wants to split the numbers 2, 3, 4, 5, 6, 7, 8, 9, 10 into some groups so that the sum of the numbers in each group is the same. What is the biggest number of groups he can make this way?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The numbers 2 + 3 + ... + 10 add to 54.
- Equal groups means each group's sum divides 54, and since 10 sits in one group every group sum is at least 10.
- The only divisor of 54 that is at least 10 and gives more than two groups is 18, which makes 54 / 18 = 3 groups (e.g. {10,8}, {9,7,2}, {6,5,4,3}).
- So the most groups is 3.
2020 Β· #29 Sonia writes three consecutive whole numbers, one on each side of a triangle. Then, on each vertex of the triangle, she writes the sum...
Sonia writes three consecutive whole numbers, one on each side of a triangle. Then, on each vertex of the triangle, she writes the sum of the numbers written on the two sides that meet at that vertex, and she multiplies these three vertex numbers, obtaining the product 504. What is the product of the three numbers written on the sides of the triangle?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- With sides n, n+1, n+2, the three vertices hold (2n+1), (2n+2), (2n+3), and their product is 504.
- Testing, 7 × 8 × 9 = 504, so 2n+1 = 7, giving n = 3 and sides 3, 4, 5.
- The product of the side numbers is 3 × 4 × 5 = 60.
- The answer is 60, choice B.
Modular arithmetic β clocks and remainders
Modular arithmetic is the math of leftovers. Instead of asking “what’s the actual answer?” you ask “what’s left over after dividing?”
You already know it from clocks. If it’s 9:00 and you wait 5 hours, the clock reads 2:00, not 14:00. The hour hand doesn’t care that 9 + 5 = 14 — it only cares about the leftover after 12.
9 + 5 = 14, but the clock loops back at 12. So 14 mod 12 = 2. The clock IS modular arithmetic.
Days of the week work the same way, but with cycle 7. Today + 7 days = same day. Today + 30 days = same day shifted by 30 mod 7 = 2.
Reading the notation “a ≡ b (mod n)”
| You see … | Read it as … | Why |
|---|---|---|
14 ≡ 2 (mod 12) | 14 and 2 leave the same leftover when divided by 12 | 14 = 1·12 + 2; 2 = 0·12 + 2 — both leftover 2 |
30 ≡ 2 (mod 7) | 30 days from now is 2 weekdays ahead | 30 = 4·7 + 2 — leftover 2 |
100 ≡ 0 (mod 5) | 100 leaves NO leftover when divided by 5 | 100 = 20·5 + 0 — perfect multiple |
The superpower: do arithmetic with leftovers
Once you switch into leftover-mode, you can replace huge numbers with tiny ones before adding or multiplying. The leftover of the final answer comes out the same.
100 mod 7 matters. 100 = 14×7 + 2, so the leftover is 2. Step 2 days past Tuesday and you land on Thursday — but the leftover itself is 2, which is all you needed to compute.The fencepost trap — counting a range
“How many whole numbers from 4 to 20?” Your instinct says 20 − 4 = 16. Resist it — that’s the classic off-by-one mistake. Subtracting counts the GAPS between numbers, not the numbers themselves.
Think of fence posts and the panels between them. A fence with 5 posts has only 4 panels. Posts > panels, always by one.
COUNTING WHOLE NUMBERS IN A RANGE
Inclusive count (both ends counted) = last − first + 1. The +1 is the extra post.
From 4 to 20: 20 − 4 + 1 = 17 numbers. Not 16.
WORKED EXAMPLE — kangaroo-2016-kadett-01
How many natural numbers are STRICTLY between 3.17 and 20.16?
“Strictly between” means the whole numbers bigger than 3.17 and smaller than 20.16. The first is 4 (3 is too small); the last is 20 (21 is too big).
So count 4, 5, 6, …, 20. Use the formula: 20 − 4 + 1 = 17. (Subtracting alone would have given the wrong 16.)
Same trap shows up as cuts on a rope (n cuts make n+1 pieces) and posts on a track. Whenever you count things in a line, ask: am I counting the posts, or the gaps? For an inclusive count, it’s last − first plus one.
For “days of the week N days later” problems, reduce N mod 7. For “hours later on a 12-hour clock” problems, reduce mod 12. The pattern is the same: identify the cycle length, reduce, then read.
For arithmetic in modular form, replace each number with its remainder before adding or multiplying. This is the only way to handle huge numbers.
Carlos Montado was born on Saturday, November 9, 2002. On what day of the week will Carlos be 706 days old?
Carlos was born on a Saturday. What day of the week is he when he's 706 days old?
Weekdays repeat every 7 days, so any chunk of whole weeks is invisible — it lands you right back on the same day. Strip them out.
Split 706 the easy way: 706 = 700 + 6. And 700 is exactly 100 weeks (700 = 100 × 7), so those 700 days drop you back on Saturday with nothing changed.
Now step the 6 leftover days past Saturday: Sun, Mon, Tue, Wed, Thu, Friday.
So Carlos is 706 days old on a Friday.
For any “what day/spot after N steps” question with a 7-cycle, only the leftover of N after pulling out whole weeks matters. Break N into (multiple of 7) + (small remainder) and walk only the remainder — here, 6 steps instead of 706.
Any cycle problem reduces mod its cycle length. Days mod 7, hours mod 12, units digit mod 10. Replace big numbers with their remainders before doing arithmetic.
1986 Β· #5 A contest began at noon one day and ended 1000 minutes later. At what time did the contest end?
A contest began at noon one day and ended 1000 minutes later. At what time did the contest end?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Clocks count in hours, so first turn 1000 minutes into hours. Since 60 minutes make an hour, 1000 Γ· 60 = 16 with 40 left over: that's 16 hours 40 minutes.
- Add to noon. 16 hours past noon: noon + 12 h = midnight, then + 4 more h = 4:00 a.m.; the leftover 40 minutes makes 4:40 a.m. the next day.
- Why split off the 12 first: jumping straight to midnight handles the a.m./p.m. flip cleanly, so you don't accidentally land on 4:40 p.m.
2016 Β· #5 The number N is a two-digit number.When N is divided by 9, the remainder is 1.When N is divided by 10, the remainder is 3.What is the...
The number N is a two-digit number.
- When N is divided by 9, the remainder is 1.
- When N is divided by 10, the remainder is 3.
What is the remainder when N is divided by 11?
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- "Leftover 3 when divided by 10" means the units digit is 3, so N ∈ {13, 23, 33, 43, 53, 63, 73, 83, 93}.
- Digit-sum test for division by 9 (a number and its digit sum leave the same leftover): 13→4, 23→5, …, 73→10 which leaves 1. Only 73 leaves a leftover of 1. So N = 73.
- Now answer the real question: 73 = 11 × 6 + 7, so the leftover when divided by 11 is 7.
- Why this transfers: when several remainder conditions overlap, start with the one that fixes the most (divide-by-10 fixes a whole digit), then sieve the short list — far faster than algebra.
2024 Β· #22 Daniel wants to cut a rope into 12 equal pieces and marks the places where he has to cut. Mohammed wants to cut the same rope into 16...
Daniel wants to cut a rope into 12 equal pieces and marks the places where he has to cut. Mohammed wants to cut the same rope into 16 equal pieces and marks his cuts as well. Maya finally cuts the rope at all the marked spots. How many pieces does Maya get?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Daniel makes 11 marks (at 1/12, 2/12, β¦, 11/12) and Mohammed makes 15 marks (at 1/16, β¦, 15/16).
- Marks coincide where the positions match, which happens at 1/4, 1/2 and 3/4 β that is 3 shared marks.
- Distinct cut points: 11 + 15 β 3 = 23.
- Cutting at 23 points gives 23 + 1 = 24 pieces.
1999 Β· #24 When 19992000 is divided by 5, the remainder is
When 19992000 is divided by 5, the remainder is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Dividing by 5 only cares about the last digit (10, 20, 30, β¦ are all multiples of 5), and the last digit of a power only depends on the base's last digit, 9.
- Powers of 9 cycle in their units digit: 9, 81, 729, β¦ β 9, 1, 9, 1, β¦ Odd exponent β ends in 9, even exponent β ends in 1. Since 2000 is even, 1999Β²β°β°β° ends in 1.
- A number ending in 1 is one more than a multiple of 10 (hence of 5), so the remainder is 1. The transferable idea: for last-digit or mod-5/mod-10 questions, ignore the giant number and ride the short repeating cycle of units digits.
- Modulo 5, 1999 leaves remainder 4 (since 2000 is a multiple of 5), so 1999Β²β°β°β° β‘ 4Β²β°β°β° (mod 5).
- And 4 β‘ β1 (mod 5), so 4Β²β°β°β° β‘ (β1)Β²β°β°β° = 1 (mod 5).
- The remainder is 1. Spotting that the base is β1 away from a multiple of 5 makes an even power collapse to 1 instantly β a clean trick once you've met modular arithmetic.
2018 Β· #21 How many positive three-digit integers have a remainder of 2 when divided by 6, a remainder of 5 when divided by 9, and a remainder of 7...
How many positive three-digit integers have a remainder of 2 when divided by 6, a remainder of 5 when divided by 9, and a remainder of 7 when divided by 11?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Rewrite each condition as "4 short": remainder 2 mod 6 means x + 4 is divisible by 6; remainder 5 mod 9 means x + 4 divisible by 9; remainder 7 mod 11 means x + 4 divisible by 11.
- So x + 4 is a multiple of lcm(6, 9, 11) = 2 · 32 · 11 = 198.
- Three-digit x means 100 ≤ x ≤ 999, so 104 ≤ x + 4 ≤ 1003. The multiples of 198 there are 198, 396, 594, 792, 990 — 5 values.
- You'll see it again: when every remainder is the same fixed amount below its divisor, shift the variable by that amount and the simultaneous system becomes a single lcm divisibility — the cleanest route past full Chinese Remainder Theorem casework.
2011 Β· #27 Seven years ago Evaβs age was a multiple of 8. In eight years it will be a multiple of 7. Eight years ago Raffiβs age was a multiple of...
Seven years ago Eva’s age was a multiple of 8. In eight years it will be a multiple of 7. Eight years ago Raffi’s age was a multiple of 7. In seven years it will be a multiple of 8. Which of the following statements can be true?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Eva needs \(E-7\) a multiple of 8 and \(E+8\) a multiple of 7; the smallest realistic age that fits both is \(E=55\) (since \(48\) and \(63\) work).
- Raffi needs \(R-8\) a multiple of 7 and \(R+7\) a multiple of 8; the smallest realistic age that fits both is \(R=57\) (since \(49\) and \(64\) work).
- With \(E=55\) and \(R=57\), Raffi is exactly 2 years older than Eva, so statement A can be true.
Stretch test
Five harder number-theory problems. Each one combines two or three of the habits above.
2018 Β· #25 How many perfect cubes lie between 28 + 1 and 218 + 1, inclusive?
How many perfect cubes lie between 28 + 1 and 218 + 1, inclusive?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Upper end: 218 = (26)3 = 643, which is ≤ 218 + 1, so base 64 counts but base 65 (= 653) blows past the limit. Largest base: 64.
- Lower end: 28 + 1 = 257. Bracket it between cubes: 63 = 216 < 257 but 73 = 343 ≥ 257, so the smallest cube in range has base 7.
- Count the integer bases from 7 to 64 inclusive: 64 − 7 + 1 = 58.
- You'll see it again: "how many cubes (or squares) in a range" collapses to "how many integers between the cube roots" — and recognizing a power like 218 as a perfect cube is the move that makes the top bound exact instead of approximate.
2025 Β· #23 How many four-digit numbers have all three of the following properties?The tens digit and ones digit are both 9.The number is 1 less...
How many four-digit numbers have all three of the following properties?
- The tens digit and ones digit are both 9.
- The number is 1 less than a perfect square.
- The number is the product of exactly two prime numbers.
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Decode the conditions instead of testing thousands of numbers. "Ends in 99" + 1 = ends in 00, and a square ending in 00 must be (10k)2. So the number is (10k)2 − 1 = (10k − 1)(10k + 1) — a difference of squares, factored for free.
- Four-digit size forces 10k ∈ {40, 50, 60, 70, 80, 90, 100}, just 7 cases.
- "Product of exactly two primes" now means both 10k − 1 and 10k + 1 are prime. Check: 39×41 (39 = 3×13, no), 49×51 (49 = 72, no), 59×61 (both prime ✓), 69×71 (69 = 3×23, no), 79×81 (81 = 34, no), 89×91 (91 = 7×13, no), 99×101 (99 = 9×11, no).
- Only 59 × 61 = 3599 survives, so exactly 1.
- Why this transfers: "one less than a perfect square" should instantly trigger the difference-of-squares factoring a2 − 1 = (a−1)(a+1) — turning a vague property into a concrete factorization you can prime-test.
2018 Β· #21 How many positive three-digit integers have a remainder of 2 when divided by 6, a remainder of 5 when divided by 9, and a remainder of 7...
How many positive three-digit integers have a remainder of 2 when divided by 6, a remainder of 5 when divided by 9, and a remainder of 7 when divided by 11?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Rewrite each condition as "4 short": remainder 2 mod 6 means x + 4 is divisible by 6; remainder 5 mod 9 means x + 4 divisible by 9; remainder 7 mod 11 means x + 4 divisible by 11.
- So x + 4 is a multiple of lcm(6, 9, 11) = 2 · 32 · 11 = 198.
- Three-digit x means 100 ≤ x ≤ 999, so 104 ≤ x + 4 ≤ 1003. The multiples of 198 there are 198, 396, 594, 792, 990 — 5 values.
- You'll see it again: when every remainder is the same fixed amount below its divisor, shift the variable by that amount and the simultaneous system becomes a single lcm divisibility — the cleanest route past full Chinese Remainder Theorem casework.
2020 Β· #24 Let N be the smallest positive number such that half of N is divisible by 2, one-third of N is divisible by 3, one-quarter of N is...
Let N be the smallest positive number such that half of N is divisible by 2, one-third of N is divisible by 3, one-quarter of N is divisible by 4, one-fifth of N is divisible by 5, one-sixth of N is divisible by 6, one-eighth of N is divisible by 8, and one-ninth of N is divisible by 9. The square root of N is a number of how many digits?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The clues say N is a multiple of 4, 9, 16, 25, 36, 64 and 81.
- Their least common multiple is N = 129600.
- √129600 = 360, which has 3 digits.
- The answer is 3, choice A.
2016 Β· #24 The digits 1, 2, 3, 4, and 5 are each used once to write a five-digit number PQRST. The three-digit number PQR is divisible by 4, the...
The digits 1, 2, 3, 4, and 5 are each used once to write a five-digit number PQRST. The three-digit number PQR is divisible by 4, the three-digit number QRS is divisible by 5, and the three-digit number RST is divisible by 3. What is P?
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Divisible-by-5 is strictest: QRS ends in S, which must be 0 or 5, so S = 5.
- Divisible-by-4: QR (the last two digits of PQR) must be a multiple of 4 built from {1, 2, 3, 4} — only 12, 24, 32 work. Three cases.
- QR = 12: leftovers {3, 4} for P, T; RST = 25T has digit sum 7 + T, and T ∈ {3, 4} gives 10 or 11 — not divisible by 3. Out.
- QR = 24: leftovers {1, 3}; RST = 45T has digit sum 9 + T, and T = 3 gives 12, divisible by 3. ✓ That forces P = 1, so PQRST = 12435 and P = 1.
- QR = 32: leftovers {1, 4}; RST = 25T sum 7 + T with T ∈ {1, 4} gives 8 or 11 — not divisible by 3. Out. Only one solution survives.
- Why this transfers: for digit puzzles with several divisibility rules, always resolve the most restrictive constraint first (it pins digits outright), which shrinks the casework before the looser rules ever come up.
Stretch practice — beyond AMC 8
24 bonus problems on Number Theory. These are typed-answer (no multiple choice) and tilt harder — closer to early AMC 10. Try the ones that look fun.
Stretch Β· #1 Find every pair of different positive whole numbers \(a\) and \(b\) (with \(a>b\)) so that \(\dfrac{1}{a}+\dfrac{1}{b}=\dfrac{1}{9}\).
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Both numbers must be bigger than 9: if \(b\le 9\) then \(\tfrac1b\ge\tfrac19\), which already uses up all of \(\tfrac19\), leaving nothing for \(\tfrac1a\). So \(a>b>9\).
- Clear fractions by multiplying \(\tfrac1a+\tfrac1b=\tfrac19\) by \(9ab\): \(9b+9a=ab\), so \(ab-9a-9b=0\).
- Add \(81\) to both sides so the left factors: \(ab-9a-9b+81=81\), i.e. \((a-9)(b-9)=81\).
- List factor pairs of \(81\) with the bigger factor going to \(a\): \(a-9=81, b-9=1\Rightarrow a=90, b=10\); and \(a-9=27, b-9=3\Rightarrow a=36, b=12\). (The split \(9\times9\) gives \(a=b=18\), but we need \(a>b\), so skip it.)
- Check: \(\tfrac{1}{90}+\tfrac{1}{10}=\tfrac{1}{90}+\tfrac{9}{90}=\tfrac{10}{90}=\tfrac19\), and \(\tfrac{1}{36}+\tfrac{1}{12}=\tfrac{1}{36}+\tfrac{3}{36}=\tfrac{4}{36}=\tfrac19\). So the pairs are \((a,b)=(90,10)\) and \((36,12)\).
Stretch Β· #4 In the Unlucky Lottery, every prize is a power of 13 dollars β that is \(1\), \(13\), \(169\), \(2{,}197\) dollars, and so on. The total...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- To use the fewest prizes, give out the largest prizes first. The powers of 13 up to a million are \(1\), \(13\), \(169\), \(2{,}197\), \(28{,}561\), \(371{,}293\) dollars.
- Two \(371{,}293\) prizes use \(742{,}586\), leaving \(257{,}414\). Nine \(28{,}561\) prizes use \(257{,}049\), leaving \(365\). Zero \(2{,}197\) prizes (too big for \(365\)).
- Two \(169\) prizes use \(338\), leaving \(27\). Two \(13\) prizes use \(26\), leaving \(1\). One \(1\) prize finishes it.
- Total prizes: \(2+9+0+2+2+1=16\).
- Shortcut: this is exactly writing \(1{,}000{,}000\) in base thirteen, namely \(290221_{13}\); the digit sum \(2+9+0+2+2+1=16\) is the minimum number of prizes.
Stretch Β· #5 A hallway has \(100\) lockers, numbered \(1\) to \(100\), all closed. Student \(1\) opens every locker. Student \(2\) changes (opens if...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Focus on one locker, number \(m\). Student \(n\) touches it exactly when \(n\) divides \(m\). So locker \(m\) gets touched once for every divisor of \(m\), and it ends OPEN when the number of divisors is ODD.
- Divisors come in pairs \((d, m/d)\). For example \(12\) has the pairs \((1,12), (2,6), (3,4)\) β six divisors, an even number, so locker \(12\) ends closed.
- The only way to get an ODD count is when one divisor pairs with itself, meaning \(d = m/d\), so \(m = d^2\). For example \(9\) has divisors \(1, 3, 9\): the pair \((3,3)\) is just one number, giving the odd count \(3\).
- So the lockers that stay open are exactly the perfect squares \(1, 4, 9, 16, 25, 36, 49, 64, 81, 100\) β ten lockers.
Stretch Β· #11 Look at these sums: \(1 = 1\), \(1+3 = 4\), \(1+3+5 = 9\), \(1+3+5+7 = 16\). Adding up the first \(n\) odd numbers always gives a...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- The answers \(1, 4, 9, 16, 25, \dots\) are the perfect squares \(1^2, 2^2, 3^2, 4^2, \dots\)
- Build the sum as a square of dots. To grow a \(k \times k\) square into the next square, add an L-shaped border: a column of \(k\) dots, a row of \(k\) dots, and \(1\) corner dot.
- That border has \(k + k + 1 = 2k + 1\) dots β exactly the next odd number. So \(1 + 3 + 5 + \dots + (2n-1) = n^2\).
- Adding the first \(10\) odd numbers therefore gives \(10^2 = 100\).
Stretch Β· #13 Find the sum of all whole numbers from 1 to 300 that are divisible by neither 8 nor 6.
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- All numbers 1 to 300: \(\tfrac{300 \times 301}{2} = 45{,}150\).
- Multiples of 8 (\(8 \times 1\) to \(8 \times 37\)): \(8 \times \tfrac{37 \times 38}{2} = 8 \times 703 = 5{,}624\). Multiples of 6 (\(6 \times 1\) to \(6 \times 50\)): \(6 \times \tfrac{50 \times 51}{2} = 6 \times 1275 = 7{,}650\).
- Overlap = multiples of \(\text{lcm}(8,6) = 24\) (\(24 \times 1\) to \(24 \times 12\)): \(24 \times \tfrac{12 \times 13}{2} = 24 \times 78 = 1{,}872\). So multiples of 8 OR 6 sum to \(5{,}624 + 7{,}650 - 1{,}872 = 11{,}402\).
- Numbers divisible by neither: \(45{,}150 - 11{,}402 = 33{,}748\).
Stretch Β· #14 Start adding \(1 + 2 + 3 + \cdots\), keeping a running total, until the total is a three-digit number with all three digits the same...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- The running total after \(n\) numbers is \(S = \tfrac{n(n+1)}{2} \le 999\). Since \(\tfrac{44 \times 45}{2} = 990\) and \(\tfrac{45 \times 46}{2} = 1035\), we need \(n \le 44\).
- A repdigit 'xxx' equals \(x \times 111 = x \times 3 \times 37\), so \(n(n+1) = 2 \times 3 \times 37 \times x\). The prime 37 must divide \(n\) or \(n+1\), and with \(n \le 44\) the only options are \(n = 37\) or \(n = 36\).
- \(n = 37\): \(37 \times 38 = 1406\), not divisible by 3 (digit sum 11), so no. \(n = 36\): \(36 \times 37 = 1332 = 222 \times 6\), so the total is \(666\).
- Check: \(1 + 2 + \cdots + 36 = \tfrac{36 \times 37}{2} = 666\). So you add 36 numbers.
Stretch Β· #15 Find the smallest whole number \(n\) that leaves a remainder of \(1\) when you divide it by each of \(2, 3, 4, 5, 6, 7, 8, 9\).
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- If \(n\) leaves remainder \(1\) when divided by each of \(2\) through \(9\), then \(n - 1\) divides evenly by all of them. So \(n - 1\) is their least common multiple.
- Many divisors are redundant: divisibility by \(8\) covers \(4\) and \(2\); by \(9\) covers \(3\); by \(2\) and \(3\) covers \(6\).
- The ones that really matter are \(5, 7, 8, 9\): \(\text{LCM} = 5 \times 7 \times 8 \times 9 = 2520\).
- So \(n - 1 = 2520\), giving \(n = 2521\).
Stretch Β· #15 Find the digit-sum of every number from 1 to 999, then add all those digit-sums together. (The digit-sum of 254 is \(2 + 5 + 4 = 11\).)...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Adding digit-sums is the same as counting how often each digit appears, weighted by its value. Zeros add nothing, so only digits 1 through 9 matter, and by symmetry each appears equally often.
- Count the digit 3 across 1 to 999 (think 000 to 999, three places): ones place 100 times, tens place 100 times, hundreds place 100 times — so 300 times total.
- Every nonzero digit likewise appears 300 times, so total \(= 300 (1 + 2 + \cdots + 9) = 300 \times 45 = 13{,}500\).
- The grand total is 13,500.
Stretch Β· #17 In a leap year, January has \(31\) days, February \(29\), March \(31\). Using the fact that a week repeats every \(7\) days, January 1...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Two dates fall on the same weekday exactly when the number of days between them divides evenly by \(7\), since the weekday pattern repeats every \(7\) days.
- From January 1 to April 1 the days you pass through are all of January, February, and March: \(31 + 29 + 31 = 91\) days.
- Divide by \(7\): \(91 = 7 \times 13\), an exact multiple with no remainder. So April 1 lands on the same weekday as January 1.
- Bonus: April 1 to July 1 is \(30 + 31 + 30 = 91\) days too, so July 1 also matches β that is why January, April, and July all start on the same weekday in a leap year.
Stretch Β· #18 Pick any 7 numbers from \(1, 2, 3, \dots, 12\). Show that two of them differ by exactly 6.
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Split \(1, 2, \dots, 12\) into pairs that differ by 6: \(\{1,7\}, \{2,8\}, \{3,9\}, \{4,10\}, \{5,11\}, \{6,12\}\).
- That's 6 pairs, and together they use every number from 1 to 12. Make these 6 pairs the boxes.
- Pick your 7 numbers and drop them into the boxes. Since \(7 > 6\), two of them land in the same pair.
- The two numbers in a pair differ by exactly \(6\).
Stretch Β· #19 The sum of any \(5\) numbers in a row (like \(8, 9, 10, 11, 12\)) is always divisible by \(5\), because it equals \(5\) times the middle...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Take \(5\) consecutive numbers and call the middle one \(m\): they are \(m-2, m-1, m, m+1, m+2\).
- Add them: the \(-2\) and \(+2\) cancel, the \(-1\) and \(+1\) cancel, leaving \(5m\) β five times a whole number, so always divisible by \(5\).
- For \(8, 9, 10, 11, 12\) the middle is \(m = 10\), so the sum is \(5 \times 10 = 50\).
- (Contrast: \(4\) in a row, like \(1 + 2 + 3 + 4 = 10\), has no single middle and \(10\) is not divisible by \(4\).)
Stretch Β· #21 The formula \(n^2 + n + 41\) gives a prime for \(n = 1, 2, 3, \dots, 39\). But it can't give primes forever. Find the SMALLEST positive...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Look for an \(n\) where the value factors. Try \(n = 40\): \(40^2 + 40 + 41 = 1600 + 40 + 41 = 1681 = 41 \times 41 = 41^2\) β a perfect square, so not prime.
- Check that nothing smaller fails: for \(n = 1\) through \(39\) the formula is known to give primes, so \(40\) is the smallest failure.
- Why it must eventually fail: at \(n = 41\), \(41^2 + 41 + 41 = 41(41 + 1 + 1) = 41 \times 43\), clearly composite.
- So the smallest \(n\) making it composite is \(40\).
Stretch Β· #3 A fraction is 'reducible' if its top and bottom share a common factor bigger than \(1\) (so it can be simplified). What is the smallest...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- A fraction reduces exactly when its flip reduces, so study \(\dfrac{5n+23}{n-12}\).
- Divide: \(5\) copies of \((n-12)\) make \(5n-60\), and the leftover is \((5n+23)-(5n-60)=83\). So \(\dfrac{5n+23}{n-12}=5+\dfrac{83}{n-12}\).
- The fraction reduces exactly when \(n-12\) and \(83\) share a common factor bigger than \(1\). But \(83\) is prime, so its only factor bigger than \(1\) is \(83\) itself, meaning \(n-12\) must be a multiple of \(83\).
- The smallest positive \(n\) comes from \(n-12=83\), so \(n=95\).
Stretch Β· #4 People stand in a circle, numbered \(1, 2, 3, \dots, N\) clockwise. Person \(1\) says 'one' and stays. Person \(2\) says 'two' and steps...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Build a table of survivors for small \(N\):
N 1 2 3 4 5 6 7 8 survivor 1 1 3 1 3 5 7 1 - The survivor is person \(1\) exactly when \(N\) is a power of \(2\) (\(1, 2, 4, 8, 16, \dots\)). Between powers of \(2\), the survivor jumps up by \(2\) each time (\(1, 3, 5, 7, \dots\)) and then resets to \(1\).
- So write \(N = 2^k + L\), where \(2^k\) is the biggest power of \(2\) that fits inside \(N\) and \(L\) is the leftover. The survivor's number is \(2L + 1\).
- For \(N = 100\): the biggest power of \(2\) that is \(\le 100\) is \(64\), so \(L = 100 - 64 = 36\) and the survivor is \(2(36) + 1 = 73\).
Stretch Β· #5 A hallway has 100 lockers, all closed, and 100 students. Student 1 walks by and opens every locker. Student 2 toggles every 2nd locker...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Reduce the problem β trace just the first 12 lockers by hand, marking open (O) or closed (C). The lockers left open are 1, 4, 9: the perfect squares.
- Who touches a locker? Student \(k\) toggles locker \(n\) exactly when \(k\) divides \(n\). So locker \(n\) is toggled once for each of its divisors. Locker 12 has divisors 1, 2, 3, 4, 6, 12 β six toggles.
- Every locker starts closed and each toggle flips it, so a locker ends OPEN only if it is flipped an ODD number of times β its number must have an ODD number of divisors.
- Divisors normally come in pairs \((d, n/d)\), giving an even count. The count is odd only when one divisor pairs with itself, \(d \times d = n\) β exactly when \(n\) is a perfect square (e.g. 16 has divisors 1, 2, 4, 8, 16, an odd 5, because \(4 \times 4 = 16\)).
- The open lockers are the perfect squares up to 100: \(1, 4, 9, 16, 25, 36, 49, 64, 81, 100\) β that is \(1^2\) through \(10^2\), a total of \(10\) open lockers. (In the original 1000-locker version the answer is the perfect squares up to \(31^2 = 961\), so 31 open lockers.)
Stretch Β· #5 Pick any 27 different odd numbers, each less than 100. Show that two of them must add up to 102.
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- The odd numbers below 100 are \(1, 3, 5, \dots, 99\) β that's 50 numbers.
- Group them into boxes whose two numbers add to 102: \(\{3,99\}, \{5,97\}, \{7,95\}, \dots, \{49,53\}\). That's 24 pairs.
- Two numbers have no partner: 1 (since \(102-1=101\) isn't under 100) and 51 (since \(102-51=51\) is itself). Give each its own box. Total boxes: \(24 + 2 = 26\).
- Choose your 27 numbers and drop them in. Since \(27 > 26\), some box gets 2 numbers. A singleton box holds only 1, so the doubled box must be one of the 24 pairs β and that pair sums to \(102\).
Stretch Β· #6 Every entry below is a way to write the SAME number, but each in a different counting base, and the bases go DOWN by one each step. Find...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Change your point of view: every entry is the SAME number, \(9\), just written in a different base, and the bases count DOWN by one each step (base \(9\), then \(8\), then \(7\), and so on).
- Check, going down in base: \(10\) in base \(9\) is \(1 \times 9 + 0 = 9\); \(11\) in base \(8\) is \(8 + 1 = 9\); \(12\) in base \(7\) is \(7 + 2 = 9\); \(13\) in base \(6\) is \(6 + 3 = 9\); \(14\) in base \(5\) is \(5 + 4 = 9\); and \(100\) in base \(3\) is \(3 \times 3 = 9\).
- The blank sits where the base is \(4\), so write \(9\) in base \(4\): \(9 = 2 \times 4 + 1\), which is the numeral \(21\).
- So the missing entry is \(21\) β the number \(9\) written in base \(4\).
Stretch Β· #6 Pick any 51 numbers from \(1, 2, 3, \dots, 100\). Show that two of them must have the property that one is a multiple of the other.
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Any whole number can be written as (an odd number) \(\times\) (a power of 2); call the odd factor its 'odd part'. For instance \(40 = 5\times 2^3\).
- Group the numbers 1 to 100 by odd part, e.g. \(\{1,2,4,8,16,32,64\}\), \(\{3,6,12,24,48,96\}\), \(\{5,10,20,40,80\}, \dots\). The possible odd parts are \(1,3,5,\dots,99\), which is 50, so there are 50 boxes.
- Drop your 51 chosen numbers into the 50 boxes. Since \(51 > 50\), two of them, say \(a < b\), share a box.
- In one box every number is a power of 2 times the same odd part, so \(b\) equals \(a\) times some power of 2 β making \(b\) a multiple of \(a\).
Stretch Β· #8 Bending a wire of whole-number length \(n\) at two marks to make a triangle gives some number of bending-point choices. The counts for...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Separate the row by parity. Odd lengths 3, 5, 7, 9, 11, 13, 15 give 1, 3, 6, 10, 15, 21, 28. Even lengths 4, 6, 8, 10, 12, 14 give 0, 1, 3, 6, 10, 15.
- Both lists are the triangular numbers \(T_k = 1 + 2 + \cdots + k\): \(T_1=1, T_2=3, T_3=6, T_4=10, T_5=15, T_6=21, T_7=28\).
- Why? Counting by the first bend gives a staircase \(1 + 2 + 3 + \cdots\), exactly the X-staircase from the 9-inch wire. Odd lengths start one row higher than even lengths (an even wire wastes its exact-middle mark), so the even list is shifted down.
- So the hidden pattern is the triangular numbers \(1, 3, 6, 10, 15, 21, 28, \dots\), interleaved — and an even-length wire gives the same count as the odd-length wire 3 inches shorter (14 gives 15, same as 11; 10 gives 6, same as 7).
Stretch Β· #11 A lattice point has both coordinates whole numbers, like \((4, 3)\). A straight line through the origin passes through the lattice point...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- The line through \((0,0)\) and \((6,4)\) has slope \(\tfrac{4}{6} = \tfrac{2}{3}\): go right 3, up 2.
- A line through the origin passes through every whole-number multiple of a lattice point on it: \((3,2), (6,4), (9,6), (12,8), \dots\)
- The closest one to the origin is the smallest step, \((3, 2)\), where the slope \(\tfrac{2}{3}\) is already in lowest terms.
- So the closest lattice point is \((3, 2)\).
Stretch Β· #12 Mark a point on a circle. Spin it by a fixed angle to get the next dot, spin again, and so on. If you spin by \(40^\circ\) each time,...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- You return to the start exactly when your total spin is a whole number of complete circles (\(360^\circ, 720^\circ, \dots\)).
- Spinning \(40^\circ\) each time, after \(n\) spins the total is \(40n\) degrees. The first time this is a multiple of 360 is when \(40n = 360\), so \(n = 9\).
- So there are 9 dots before returning. (For comparison, spinning \(90^\circ\) would give 4 dots, a square.)
- The answer is 9 dots.
Stretch Β· #16 Find the smallest whole number \(n\) that leaves remainder \(1\) when divided by \(5\), and remainder \(3\) when divided by \(7\)....
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Write the numbers that leave remainder \(3\) when divided by \(7\): \(3, 10, 17, 24, 31, 38, \dots\)
- Check each for 'remainder \(1\) when divided by \(5\)': \(3 \to 3\) (no), \(10 \to 0\) (no), \(17 \to 2\) (no), \(24 \to 4\) (no), \(31 \to 1\) (yes!).
- So \(n = 31\).
- Double-check: \(31 = 6 \times 5 + 1\) (remainder \(1\)) and \(31 = 4 \times 7 + 3\) (remainder \(3\)). Both work.
Stretch Β· #21 Pick any 7 numbers from \(1, 2, 3, \dots, 12\). Show that among them, one number is a multiple of another.
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- Every number is (an odd number) \(\times\) (a power of 2). Group the numbers 1 to 12 by their odd part: \(\{1,2,4,8\}, \{3,6,12\}, \{5,10\}, \{7\}, \{9\}, \{11\}\).
- The odd parts are \(1,3,5,7,9,11\) β that's 6 groups, so 6 boxes.
- Pick your 7 numbers and drop them into the boxes. Since \(7 > 6\), two numbers \(a < b\) share an odd part.
- In one box every number is the same odd part times a power of 2, so \(b\) is \(a\) times a power of 2 β making \(b\) a multiple of \(a\).
Stretch Β· #22 Pick two whole numbers with \(0 < m < n\). Build \(p = n^2 - m^2\), \(q = 2mn\), \(r = m^2 + n^2\); these always satisfy \(p^2 + q^2 =...
Show answer
Show hints
Still stuck? Show hint 2 →
Still stuck? Show hint 3 →
Show solution
- With \(m = 1, n = 2\): \(p = 2^2 - 1^2 = 3\), \(q = 2 \times 1 \times 2 = 4\), \(r = 1^2 + 2^2 = 5\) β the famous \(3, 4, 5\) triple, and \(3^2 + 4^2 = 25 = 5^2\).
- Prove it always works: \((n^2 - m^2)^2 = n^4 - 2m^2 n^2 + m^4\) and \((2mn)^2 = 4m^2 n^2\).
- Adding, the middle terms combine: \(n^4 + 2m^2 n^2 + m^4 = (n^2 + m^2)^2 = r^2\), so \(p^2 + q^2 = r^2\) for every \(m < n\). (\(m=2, n=3\) gives \(5, 12, 13\).)
- So for \(m = 1, n = 2\) the smaller leg is \(p = 3\).
Number theory quick-reference
FACTS TO KNOW COLD
- Primes β€ 50: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47.
- The only even prime is 2. 1 is NOT prime.
- To test if n is prime: trial-divide by primes β€ βn. Beyond that, no factors can hide.
- Divisibility by 3 or 9: digit sum.
- Divisibility by 4: last 2 digits.
- Divisibility by 8: last 3 digits.
- Divisibility by 11: alternating digit sum.
- Divisibility by 7: chop last digit, double it, subtract from what's left.
- Divisibility by 13: chop last digit, multiply by 4, add to what's left.
- 1001 = 7 Β· 11 Β· 13 β split into 3-digit groups, alternating sum tests all three at once.
- Difference of squares:
aΒ² β bΒ² = (a β b)(a + b). - Divisor count formula: for n = pa Β· qb Β· β¦, count = (a+1)(b+1)Β·β¦
- Divisor SUM formula: (1 + p + β¦ + pa)(1 + q + β¦ + qb)Β·β¦ — one bracket per prime, then multiply.
- Odd divisors: cover the 2's, count the rest. Even divisors: total − odd.
- Perfect-square β odd number of divisors. Every other number has an even count.
- Perfect-square divisors of n: count divisors using only EVEN exponents.
- Divisors pair up: d β n/d, product = n.
- GCD(a, b) Γ LCM(a, b) = a Γ b (two positive integers β fails for three or more).
- Scaling: gcd(na, nb) = nΒ·gcd(a, b) and lcm[na, nb] = nΒ·lcm[a, b]. Coprime βΉ lcm = product: if gcd(a,b)=1 then lcm[a,b] = ab.
- Composite test: split into RELATIVELY PRIME pieces (36 = 4Β·9 β, not 3Β·12); the split is valid only when the pieces' lcm equals the original.
- Remainder shortcut: if every remainder is (divisor β 1), answer = LCM β 1; if every remainder is 1, answer = LCM + 1.
- Euclidean algorithm: gcd(a, b) = gcd(b, a mod b). Replace the bigger with the leftover until you hit 0.
- Units-digit cycles: 2/3/7/8 β period 4; 4/9 β period 2; 0/1/5/6 β stuck.
- Digit sum β‘ N (mod 9).
- 1 is not prime. The smallest prime is 2.
- Confusing “multiple of” with “divisor of”. Multiples of 6: 6, 12, 18, 24, β¦ Divisors of 6: 1, 2, 3, 6.
- Mod-cycle off-by-one. If a cycle has period 4 starting at n=1, then n=4 hits the 4th entry (the last), n=5 wraps to the 1st.
- Forgetting primes with exponent 1. 60 = 2Β²Β·3Β·5 has (2+1)(1+1)(1+1) = 12 divisors. The exponent-1 primes still contribute a (+1) factor.
- Computing huge powers directly. Always reduce mod the relevant modulus first.
- Splitting a composite the wrong way. To test divisibility by 36, use 4×9 (coprime), NOT 3×12 — 3 and 12 share a factor, so “divisible by 3 and 12” only forces divisibility by 12. The pieces must be relatively prime (their lcm equals the original).
- GCD × LCM = product is for TWO numbers only. It fails for three or more.
Drill these until they're reflexive:
- Factor in your head: 72 = 2Β³Β·3Β², 100 = 2Β²Β·5Β², 144 = 2β΄Β·3Β², 168 = 2Β³Β·3Β·7, 360 = 2Β³Β·3Β²Β·5.
- Count divisors of 360 = 2Β³Β·3Β²Β·5. (Answer: 4Β·3Β·2 = 24)
- What's the units digit of 7100? (Cycle period 4; 100 mod 4 = 0 β last in cycle = 1.)
- What's 210 mod 7? (1024 = 146Β·7 + 2, so remainder 2.)
- Smallest multiple of both 4 and 6? (LCM = 12.)
- Largest divisor of both 18 and 24? (GCD = 6.)
- Is 91 prime? (No: 91 = 7Β·13.)
- Factor 1001. (1001 = 7Β·11Β·13 β memorize this!)
- Is 154 divisible by 7? (15 β 2Β·4 = 7 β.)
- Is 247 divisible by 13? (24 + 4Β·7 = 52 = 13Β·4 β.)
- Is 854,854 divisible by 11? (Yes β repeating 3-block ABCABC means it's abcΒ·1001, divisible by 7, 11, AND 13.)
Want to climb higher? — advanced number-theory tools (#22–#25 territory)
- Perfect-square filter (mod 3, mod 4). A perfect square can ONLY have these remainders:
· mod 3: 0 or 1 (never 2). So if N ≡ 2 (mod 3), N is NOT a perfect square.
· mod 4: 0 or 1 (never 2 or 3). So if N ≡ 2 or 3 (mod 4), N is NOT a perfect square.
Great for “is X a perfect square?” questions — rules out most numbers in one glance. - Product of divisors of n:
nd/2where d is the number of divisors. (Pair each divisor with its partner; the product of every pair is n — the same pairing idea behind the divisor-sum trick in chapter 4.) - Chicken McNugget Theorem. If
aandbare coprime positive integers, the largest amount you CANNOT make as a non-negative combination of a’s and b’s isab − a − b. (For 4 and 7: the largest unmakeable amount is 4·7 − 4 − 7 = 17.) - Legendre’s formula (exponent of prime p in n!):
vp(n!) = ⌊n/p⌋ + ⌊n/p²⌋ + ⌊n/p³⌋ + …— useful for “how many trailing zeros does 100! have?” (answer: v5(100!) = 20 + 4 = 24).