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 the AMC.
Typically 3–5 problems on every AMC 8 are number theory (more in recent years): 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
Divisible means "divides evenly with no remainder." 12 is divisible by 3 because 12 ÷ 3 = 4 exactly. 13 is not divisible by 3 because 13 ÷ 3 leaves a remainder of 1.
You could test divisibility by actually doing the division — but for every common divisor (2, 3, 4, 5, 6, 8, 9, 10, 11), there's a shortcut rule that lets you check just by looking at the digits. Memorize these. They show up everywhere on AMC 8.
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 AMC 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" (used in amc8-2017-07): 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 AMC problems.
Why does the rule work? Just look. 👀
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 just 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 just 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.
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.
Malcolm wants to visit Isabella after school today and knows the street where she lives but doesn't know her house number. She tells him, "My house number has two digits, and exactly three of the following four statements about it are true."
- It is prime.
- It is even.
- It is divisible by 7.
- One of its digits is 9.
This information allows Malcolm to determine Isabella's house number. What is its units digit?
Malcolm is told: "My house number has two digits, and exactly three of the following four statements about it are true: (1) it is prime, (2) it is even, (3) it is divisible by 7, (4) one of its digits is 9."
Three statements are true; exactly one is false. The number is two digits.
Statements (1) prime and (2) even can't both be true — the only even prime is 2, which isn't two digits. So one of them is the false one.
Try the case where (1) is false (the number is not prime). Then (2), (3), (4) are all true: the number is even, divisible by 7, and has a 9 as one of its digits.
Even + divisible by 7 → divisible by 14. Two-digit multiples of 14: 14, 28, 42, 56, 70, 84, 98. Which one has a 9 as a digit? Only 98.
Check: 98 = 2 · 7² — not prime ✓, even ✓, divisible by 7 ✓, contains 9 ✓. Three true, one false ✓.
The units digit of the house number is 8.
The trick is to use divisibility rules to narrow a list. "Even + divisible by 7" doesn't mean two separate checks — it means divisible by 14. Then there are only seven two-digit candidates instead of 90, and the digit-9 condition picks one.
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).
2017 · #7 Let Z be a 6-digit positive integer, such as 247247, whose first three digits are the same as its last three digits taken in the same...
Let Z be a 6-digit positive integer, such as 247247, whose first three digits are the same as its last three digits taken in the same order. Which of the following numbers must also be a factor of Z?
Show answer
Show hint
Show solution
- Z = abcabc = abc · 1001.
- 1001 = 7 · 11 · 13. So 11 is always a factor of Z.
2005 · #18 How many three-digit numbers are divisible by 13?
How many three-digit numbers are divisible by 13?
Show answer
Show hint
Show solution
- Smallest 3-digit multiple: 13 · 8 = 104. Largest: 13 · 76 = 988.
- Multipliers 8 through 76: 76 − 8 + 1 = 69.
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 →
Show solution
- Last digit 3, so N ∈ {13, 23, 33, 43, 53, 63, 73, 83, 93}.
- Sum-of-digits test for mod 9: only 73 has digit sum 10 ≡ 1 (mod 9). So N = 73.
- 73 mod 11: 11 × 6 = 66, remainder 7. Answer: 7.
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 pair must include a multiple of 3 (a 3 or a 6) and an even number.
- Sum 6 comes only from (1,5), (2,4), (3,3) — products 5, 8, 9, none a multiple of 6. So 6 is impossible.
- Every other choice has a good pair: 5 = (2,3)→6, 7 = (1,6)→6, 8 = (2,6)→12, 9 = (3,6)→18.
- 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.
2000 · #11 The number 64 has the property that it is divisible by its units digit. How many whole numbers between 10 and 50 have this property?
The number 64 has the property that it is divisible by its units digit. How many whole numbers between 10 and 50 have this property?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Units digit 1, 2, and 5 each give 4 working numbers (12 total). Then 33 (digit 3), 24 and 44 (digit 4), 36 (digit 6), and 48 (digit 8) work; digits 0, 7, 9 give none.
- Total = 12 + 1 + 2 + 1 + 1 = 17.
1994 · #6 The units digit (one's digit) of the product of any six consecutive positive whole numbers is
The units digit (one's digit) of the product of any six consecutive positive whole numbers is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Any six consecutive numbers include a multiple of 5 and at least one even number.
- Their product is therefore a multiple of 10, so its units digit is 0.
Primes — the building blocks
A prime number is a whole number greater 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 can be split. 6 = 2 × 3, so 6 is composite. 7 can’t be split, so 7 is prime.
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.
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.
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.
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 hint
Show solution
- A prime factor can't be smaller than 2, and only even numbers have 2 as a factor.
- 58 is the only even choice, so its smallest prime factor is 2 — smaller than any odd number could manage. Answer 58.
2023 · #4 (figure problem)

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Continuing the spiral outward, the diagonal through 7 (going up-left and down-right) contains the four shaded numbers 19, 23, 39, 47.
- Test each: 19 prime, 23 prime, 47 prime; but 39 = 3 × 13 is composite.
- So 3 of the four shaded numbers are prime.
- 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.
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 hint
Show solution
- 250 = 2 · 53. Two smallest (and only) primes: 2 and 5.
- Sum: 2 + 5 = 7.
2014 · #13 If n and m are integers and n2 + m2 is even, which of the following is impossible?
If n and m are integers and n2 + m2 is even, which of the following is impossible?
Show answer
Show hint
Show solution
- n2 + m2 even ⇒ n2 and m2 have the same parity ⇒ n and m have the same parity.
- Same parity ⇒ n + m is always even, never odd.
2017 · #7 Let Z be a 6-digit positive integer, such as 247247, whose first three digits are the same as its last three digits taken in the same...
Let Z be a 6-digit positive integer, such as 247247, whose first three digits are the same as its last three digits taken in the same order. Which of the following numbers must also be a factor of Z?
Show answer
Show hint
Show solution
- Z = abcabc = abc · 1001.
- 1001 = 7 · 11 · 13. So 11 is always a factor of Z.
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 hint
Show solution
- 2010 = 2 · 1005 = 2 · 3 · 335 = 2 · 3 · 5 · 67 (67 is prime).
- Sum: 2 + 3 + 5 + 67 = 77.
Prime factorization — every integer's fingerprint
Every whole number ≥ 2 can be written as a product of primes in exactly one way (the order doesn't matter). This is called the Fundamental Theorem of Arithmetic, and it's the most important fact in number theory.
Example: 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5. This is the only way to break 60 into primes.
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.
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.
What is the sum of the distinct prime integer divisors of 2016?
We want the sum of the distinct prime divisors of 2016. "Distinct" means "different primes that show up" — each prime counts once even if it appears with a higher exponent.
Factor 2016. Start with 2:
- 2016 ÷ 2 = 1008
- 1008 ÷ 2 = 504
- 504 ÷ 2 = 252
- 252 ÷ 2 = 126
- 126 ÷ 2 = 63 (now 63 is odd)
- 63 ÷ 3 = 21
- 21 ÷ 3 = 7
- 7 is prime.
So 2016 = 2⁵ × 3² × 7. The distinct primes are 2, 3, and 7. Their sum: 2 + 3 + 7 = 12.
Don't multiply the exponents in. "Distinct" means "how many different primes appear." 2 shows up 5 times in the factorization but it's still just one prime.
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.
2018 · #18 How many positive factors does 23,232 have?
How many positive factors does 23,232 have?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Factor: 23,232 = 2 · 11,616 = 22 · 5,808 = … = 26 · 363 = 26 · 3 · 121 = 26 · 3 · 112.
- Number of factors: (6+1)(1+1)(2+1) = 7 · 2 · 3 = 42.
2017 · #19 For any positive integer M, the notation M! denotes the product of the integers 1 through M. What is the largest integer n for which 5n...
For any positive integer M, the notation M! denotes the product of the integers 1 through M. What is the largest integer n for which 5n is a factor of the sum
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 98! + 99! + 100! = 98!(1 + 99 + 99·100) = 98!(100 + 9900) = 98! · 10,000.
- 10,000 = 104 = 24 · 54 → contributes 4 factors of 5.
- Factors of 5 in 98!: ⌊98/5⌋ + ⌊98/25⌋ = 19 + 3 = 22.
- Total: 22 + 4 = 26.
2020 · #12 For a positive integer n, the factorial notation n! represents the product of the integers from n to 1. For example: 6! = 6 × 5 × 4 × 3...
For a positive integer n, the factorial notation n! represents the product of the integers from n to 1. For example: 6! = 6 × 5 × 4 × 3 × 2 × 1. What value of N satisfies the following equation?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 5! = 120 = 12 × 10.
- So 5! × 9! = 12 × 10 × 9! = 12 × (10 × 9!) = 12 × 10!.
- Therefore N! = 10!, so N = 10.
2003 · #19 How many integers between 1000 and 2000 have all three of the numbers 15, 20, and 25 as factors?
How many integers between 1000 and 2000 have all three of the numbers 15, 20, and 25 as factors?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Being divisible by 15, 20, and 25 is the same as being divisible by their LCM.
- LCM(15, 20, 25) = 300.
- Multiples of 300 between 1000 and 2000: 1200, 1500, 1800 — that's 3.
2016 · #7 Which of the following numbers is not a perfect square?
Which of the following numbers is not a perfect square?
Show answer
Show hint
Show solution
- 12016 = 1 (trivially a square).
- 32018 and 52020: even exponents on a prime → perfect squares.
- 42019 = (22)2019 = 24038: even exponent overall → perfect square.
- 22017: prime with odd exponent → NOT a perfect square.
2018 · #14 Let N be the greatest five-digit number whose digits have a product of 120. What is the sum of the digits of N?
Let N be the greatest five-digit number whose digits have a product of 120. What is the sum of the digits of N?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Largest digit dividing 120 is 8 (since 9 doesn't divide 120). After taking out 8: leftover product 15.
- Largest digit dividing 15 is 5. Leftover: 3. Largest digit dividing 3 is 3. Leftover: 1 → fill remaining digits with 1.
- N = 85311. Digit sum: 8 + 5 + 3 + 1 + 1 = 18.
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
- Since 700 is a multiple of 7, after 700 days the weekday is again Saturday.
- Six more days past Saturday lands on Friday.
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 hint
Show solution
- 2010 = 2 · 1005 = 2 · 3 · 335 = 2 · 3 · 5 · 67 (67 is prime).
- Sum: 2 + 3 + 5 + 67 = 77.
2018 · #18 How many positive factors does 23,232 have?
How many positive factors does 23,232 have?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Factor: 23,232 = 2 · 11,616 = 22 · 5,808 = … = 26 · 363 = 26 · 3 · 121 = 26 · 3 · 112.
- Number of factors: (6+1)(1+1)(2+1) = 7 · 2 · 3 = 42.
Counting divisors — exponent + 1, multiplied
Once you have the prime factorization, counting divisors is a one-line formula.
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? Every divisor is built by choosing how many copies of each prime to include. For a prime pa, the exponent in the divisor can be 0, 1, 2, …, a — that's a+1 choices. Multiply across all primes.
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). If n IS a perfect square, the divisor √n pairs with itself — so the count is odd. (Example: 36 has 9 divisors. The middle one is 6 = √36.)
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).
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 positive factors does 23,232 have?
Factor 23,232. Divide by 2:
- 23232 ÷ 2 = 11616
- 11616 ÷ 2 = 5808
- 5808 ÷ 2 = 2904
- 2904 ÷ 2 = 1452
- 1452 ÷ 2 = 726
- 726 ÷ 2 = 363 (now 363 is odd, so 2 is done)
- 363 ÷ 3 = 121
- 121 = 11 × 11.
So 23,232 = 2⁶ · 3 · 11².
Apply the divisor count formula: (6+1)(1+1)(2+1) = 7 × 2 × 3 = 42 positive divisors.
Spend the time on the factorization — that's the hard part. Once you have it, the (a+1)(b+1)… formula is automatic. The exponent of 3 is 1, so you write (1+1) — easy to forget that primes with exponent 1 still contribute.
Factor first. Then multiply (exponent + 1) for each prime. Don't forget primes with exponent 1 — they contribute a factor of 2.
2016 · #9 What is the sum of the distinct prime integer divisors of 2016?
What is the sum of the distinct prime integer divisors of 2016?
Show answer
Show hint
Show solution
- 2016 = 25 · 32 · 7.
- Distinct primes: 2, 3, 7. Sum = 2 + 3 + 7 = 12.
2017 · #7 Let Z be a 6-digit positive integer, such as 247247, whose first three digits are the same as its last three digits taken in the same...
Let Z be a 6-digit positive integer, such as 247247, whose first three digits are the same as its last three digits taken in the same order. Which of the following numbers must also be a factor of Z?
Show answer
Show hint
Show solution
- Z = abcabc = abc · 1001.
- 1001 = 7 · 11 · 13. So 11 is always a factor of Z.
2017 · #19 For any positive integer M, the notation M! denotes the product of the integers 1 through M. What is the largest integer n for which 5n...
For any positive integer M, the notation M! denotes the product of the integers 1 through M. What is the largest integer n for which 5n is a factor of the sum
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 98! + 99! + 100! = 98!(1 + 99 + 99·100) = 98!(100 + 9900) = 98! · 10,000.
- 10,000 = 104 = 24 · 54 → contributes 4 factors of 5.
- Factors of 5 in 98!: ⌊98/5⌋ + ⌊98/25⌋ = 19 + 3 = 22.
- Total: 22 + 4 = 26.
2020 · #17 How many factors of 2020 have more than 3 factors? (As an example, 12 has 6 factors, namely 1, 2, 3, 4, 6, and 12.)
How many factors of 2020 have more than 3 factors? (As an example, 12 has 6 factors, namely 1, 2, 3, 4, 6, and 12.)
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 2020 = 22 · 5 · 101 has (2+1)(1+1)(1+1) = 12 factors.
- Factors with ≤ 3 factors: 1 (1 factor); 2, 5, 101 (2 factors each — primes); 4 (3 factors — prime squared). That's 5 of the 12.
- Remaining: 12 − 5 = 7 factors with more than 3 factors.
1988 · #14 ◇ and △ are whole numbers and ◇ × △ = 36. The largest possible value of ◇ + △ is
◇ and △ are whole numbers and ◇ × △ = 36. The largest possible value of ◇ + △ is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Factor pairs of 36: (1,36), (2,18), (3,12), (4,9), (6,6). Their sums: 37, 20, 15, 13, 12.
- The largest is 1 + 36 = 37.
2018 · #14 Let N be the greatest five-digit number whose digits have a product of 120. What is the sum of the digits of N?
Let N be the greatest five-digit number whose digits have a product of 120. What is the sum of the digits of N?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Largest digit dividing 120 is 8 (since 9 doesn't divide 120). After taking out 8: leftover product 15.
- Largest digit dividing 15 is 5. Leftover: 3. Largest digit dividing 3 is 3. Leftover: 1 → fill remaining digits with 1.
- N = 85311. Digit sum: 8 + 5 + 3 + 1 + 1 = 18.
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 (just 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. AMC 8 mostly uses small numbers where factoring is fine, but the algorithm is good to have in your back pocket.
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 on AMC 8 are just one of these patterns dressed up in a story.
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 just "two cycles must finish together." 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.
2004 · #19 A whole number larger than 2 leaves a remainder of 2 when divided by each of the numbers 3, 4, 5, and 6. The smallest such number lies...
A whole number larger than 2 leaves a remainder of 2 when divided by each of the numbers 3, 4, 5, and 6. The smallest such number lies between which two numbers?
Show answer
Show hint
Show solution
- Smallest x > 2 with x − 2 = 60 ⇒ x = 62.
- 62 lies between 60 and 79.
2009 · #11 The Amaco Middle School bookstore sells pencils costing a whole number of cents. Some seventh graders each bought a pencil, paying a...
The Amaco Middle School bookstore sells pencils costing a whole number of cents. Some seventh graders each bought a pencil, paying a total of $1.43. Some of the 30 sixth graders each bought a pencil, and they paid a total of $1.95. How many more sixth graders than seventh graders bought a pencil?
Show answer
Show hint
Show solution
- 143 = 11 · 13; 195 = 3 · 5 · 13. So price | 13 and price > 1 ⇒ price = 13¢.
- Seventh graders: 143/13 = 11. Sixth graders: 195/13 = 15.
- Difference: 15 − 11 = 4.
2012 · #13 Jamar bought some pencils costing more than a penny each at the school bookstore and paid $1.43. Sharona bought some of the same pencils...
Jamar bought some pencils costing more than a penny each at the school bookstore and paid $1.43. Sharona bought some of the same pencils and paid $1.87. How many more pencils did Sharona buy than Jamar?
Show answer
Show hint
Show solution
- gcd(143, 187) = 11 (since 143 = 11 · 13, 187 = 11 · 17). Price > 1 cent ⇒ price = 11 cents.
- Difference Sharona − Jamar = (187 − 143) / 11 = 44 / 11 = 4.
2012 · #15 The smallest number greater than 2 that leaves a remainder of 2 when divided by 3, 4, 5, or 6 lies between what numbers?
The smallest number greater than 2 that leaves a remainder of 2 when divided by 3, 4, 5, or 6 lies between what numbers?
Show answer
Show hint
Show solution
- x − 2 divisible by 3, 4, 5, 6 ⇒ divisible by lcm = 60.
- Smallest such x > 2 is x = 60 + 2 = 62, which lies between 61 and 65.
2015 · #22 On June 1, a group of students is standing in rows, with 15 students in each row. On June 2, the same group is standing with all of the...
On June 1, a group of students is standing in rows, with 15 students in each row. On June 2, the same group is standing with all of the students in one long row. On June 3, the same group is standing with just one student in each row. On June 4, the same group is standing with 6 students in each row. This process continues through June 12 with a different number of students per row each day. However, on June 13, they cannot find a new way of organizing the students. What is the smallest possible number of students in the group?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Each day's number of students per row is a divisor of n, and all 12 are different ⇒ n has exactly 12 divisors (no 13th option exists).
- n is a multiple of 15 and 6, hence of lcm(6, 15) = 30 = 2 · 3 · 5. That has only (1+1)(1+1)(1+1) = 8 divisors.
- Double one prime exponent to get 12: 22 · 3 · 5 = 60 has (2+1)(1+1)(1+1) = 12 divisors. The other options (32·2·5 = 90, 2·3·52=150) are larger.
- Smallest n = 60.
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.)
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 ✓.
The 5-digit number 2018U is divisible by 9. What is the remainder when this number is divided by 8?
The 5-digit number is 2018U and it's divisible by 9.
By the digit-sum rule for 9: 2 + 0 + 1 + 8 + U = 11 + U must be a multiple of 9.
11 + U ∈ {9, 18, 27, …}. Since U is a digit (0–9), 11 + U is between 11 and 20. So 11 + U = 18 → U = 7.
The number is 20187.
Now find the remainder when 20187 is divided by 8. By the rule for 8, look only at the last three digits: 187.
187 ÷ 8 = 23 remainder 3 (since 23 × 8 = 184, and 187 − 184 = 3).
So 20187 mod 8 = 3.
Two divisibility rules used back-to-back: digit sum for 9 to identify U, then last-three-digits for 8 to find the remainder. This kind of problem rewards knowing the rules cold.
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.
2024 · #4 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....
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?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 1 + 2 + 3 + … + 9 = 45.
- Leaving out x (from 1 to 9) gives 45 − x, which is between 36 and 44.
- The only perfect square in that range is 36 = 62.
- 45 − x = 36, so x = 9.
2006 · #11 How many two-digit numbers have digits whose sum is a perfect square?
How many two-digit numbers have digits whose sum is a perfect square?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Sum = 1: {10} ⇒ 1.
- Sum = 4: {13, 22, 31, 40} ⇒ 4.
- Sum = 9: {18, 27, 36, 45, 54, 63, 72, 81, 90} ⇒ 9.
- Sum = 16: {79, 88, 97} ⇒ 3.
- Total: 1 + 4 + 9 + 3 = 17.
1997 · #5 There are many two-digit multiples of 7, but only two of them have a digit sum of 10. The sum of these two multiples of 7 is
There are many two-digit multiples of 7, but only two of them have a digit sum of 10. The sum of these two multiples of 7 is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Among 14, 21, 28, …, 98, the ones with digit sum 10 are 28 and 91.
- Their sum is 28 + 91 = 119.
2018 · #14 Let N be the greatest five-digit number whose digits have a product of 120. What is the sum of the digits of N?
Let N be the greatest five-digit number whose digits have a product of 120. What is the sum of the digits of N?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Largest digit dividing 120 is 8 (since 9 doesn't divide 120). After taking out 8: leftover product 15.
- Largest digit dividing 15 is 5. Leftover: 3. Largest digit dividing 3 is 3. Leftover: 1 → fill remaining digits with 1.
- N = 85311. Digit sum: 8 + 5 + 3 + 1 + 1 = 18.
2019 · #13 A palindrome is a number that has the same value when read from left to right or from right to left. (For example, 12321 is a...
A palindrome is a number that has the same value when read from left to right or from right to left. (For example, 12321 is a palindrome.) Let N be the least three-digit integer which is not a palindrome but which is the sum of three distinct two-digit palindromes. What is the sum of the digits of N?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Two-digit palindromes (11, 22, …, 99) are all multiples of 11; their sum is too. So N is a multiple of 11.
- Smallest 3-digit multiple of 11 that's NOT a palindrome: 110 (palindromes are 121, 131, … — 110 isn't one).
- Check: 110 = 11 + 22 + 77 ✓ (three distinct 2-digit palindromes).
- N = 110; digit sum = 1 + 1 + 0 = 2.
2020 · #19 A number is called flippy if its digits alternate between two distinct digits. For example, 2020 and 37373 are flippy, but 3883 and...
A number is called flippy if its digits alternate between two distinct digits. For example, 2020 and 37373 are flippy, but 3883 and 123123 are not. How many five-digit flippy numbers are divisible by 15?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 5-digit flippy: ababa with a ≠ b and a ≠ 0.
- Div by 5 ⇒ last digit (= a) is 0 or 5. Since a ≠ 0, a = 5.
- Number is 5b5b5. Div by 3 ⇒ digit sum 15 + 2b div by 3 ⇒ b div by 3, so b ∈ {0, 3, 6, 9} (and all are ≠ 5).
- 4 flippy numbers.
Divisors, GCD/LCM, digit sums
Three problems that need the divisor formula or a digit-sum check.
2016 · #9 What is the sum of the distinct prime integer divisors of 2016?
What is the sum of the distinct prime integer divisors of 2016?
Show answer
Show hint
Show solution
- 2016 = 25 · 32 · 7.
- Distinct primes: 2, 3, 7. Sum = 2 + 3 + 7 = 12.
2012 · #15 The smallest number greater than 2 that leaves a remainder of 2 when divided by 3, 4, 5, or 6 lies between what numbers?
The smallest number greater than 2 that leaves a remainder of 2 when divided by 3, 4, 5, or 6 lies between what numbers?
Show answer
Show hint
Show solution
- x − 2 divisible by 3, 4, 5, 6 ⇒ divisible by lcm = 60.
- Smallest such x > 2 is x = 60 + 2 = 62, which lies between 61 and 65.
2018 · #7 The 5-digit number 2018U is divisible by 9. What is the remainder when this number is divided by 8?
The 5-digit number 2018U is divisible by 9. What is the remainder when this number is divided by 8?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Sum of digits 2+0+1+8+U = 11 + U must be a multiple of 9 (with 0 ≤ U ≤ 9). So U = 7.
- 20187 ÷ 8 = 2523 remainder 3 (since 2523 × 8 = 20184). Remainder: 3.
Units digit cycles — what big powers end in
When you raise a number to higher and higher powers, the units digit (the last digit) follows a short repeating pattern.
For example, powers of 2:
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 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.
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).
2000 · #14 What is the units digit of 1919 + 9999?
What is the units digit of 1919 + 9999?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Powers of 9 end in 9 for odd exponents and 1 for even ones. Both 19 and 99 end in 9, and both exponents are odd, so each power ends in 9.
- 9 + 9 = 18, so the units digit is 8.
2019 · #14 Isabella has 6 coupons that can be redeemed for free ice cream cones at Pete's Sweet Treats. In order to make the coupons last, she...
Isabella has 6 coupons that can be redeemed for free ice cream cones at Pete's Sweet Treats. In order to make the coupons last, she decides that she will redeem one every 10 days until she has used them all. She knows that Pete's is closed on Sundays, but as she circles the 6 dates on her calendar, she realizes that no circled date falls on a Sunday. On what day of the week does Isabella redeem her first coupon?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 10 days advances the day-of-week by 10 mod 7 = 3 days. So the six redemption days have day-of-week offsets {0, 3, 6, 2, 5, 1} mod 7 from the start.
- These 6 offsets cover everything except offset 4. Sunday must be that missing offset, so start day is Sunday − 4 days.
- Counting back from Sunday: Sat, Fri, Thu, Wed.
2022 · #17 If n is an even positive integer, the double-factorial notation n!! represents the product of all the even integers from 2 to n. For...
If n is an even positive integer, the double-factorial notation n!! represents the product of all the even integers from 2 to n. For example: 8!! = 2 × 4 × 6 × 8. What is the units digit of the following sum?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- n!! for n ≥ 10 contains the factor 10, so its units digit is 0.
- Compute only the survivors: 2!! = 2, 4!! = 8, 6!! = 48, 8!! = 384. Their units digits: 2, 8, 8, 4.
- Sum of units digits: 2 + 8 + 8 + 4 = 22. Units digit: 2.
2025 · #6 Sekou writes down the numbers 15, 16, 17, 18, 19. After he erases one of his numbers, the sum of the remaining four numbers is a...
Sekou writes down the numbers 15, 16, 17, 18, 19. After he erases one of his numbers, the sum of the remaining four numbers is a multiple of 4. Which number did he erase?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Remainders mod 4: 15→3, 16→0, 17→1, 18→2, 19→3. Their sum is 9, which leaves remainder 1 mod 4.
- To make the remaining four sum divisible by 4, erase the one whose remainder is 1 — that's 17.
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
- Each block of ten (like 2, 4, 6, 8) multiplies to a units digit of 4, and there are 10 such blocks, so we need the units digit of 4¹⁰.
- 4² ends in 6, and any power of 6 ends in 6, so 4¹⁰ = (4²)⁵ ends in 6.
1996 · #15 The remainder when the product 1492 · 1776 · 1812 · 1996 is divided by 5 is
The remainder when the product 1492 · 1776 · 1812 · 1996 is divided by 5 is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The units digits are 2, 6, 2, 6, and 2 · 6 · 2 · 6 = 144 ends in 4.
- A number ending in 4 leaves remainder 4 when divided by 5.
Parity — the simplest mod, and the deepest
Parity is just “is this number even or odd?” The simplest math fact in the universe — but on AMC, it’s a superpower.
The combination rules — just 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 |
Where parity wins on AMC
- “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.
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.)
How many different combinations of $5 bills and $2 bills can be used to make a total of $17? Order does not matter.
How many ways can you make exactly $17 from $5 bills and $2 bills? Let f = number of $5 bills, t = number of $2 bills, so 5f + 2t = 17.
Parity move. 2t is even regardless of t. 17 is odd. So 5f must be odd — which forces f itself to be odd (because 5×even = even, 5×odd = odd).
So f ∈ {1, 3, 5, …}. Try each:
- f = 1: 5 + 2t = 17 → t = 6 ✓
- f = 3: 15 + 2t = 17 → t = 1 ✓
- f = 5: 25 > 17 — too big.
Exactly 2 combinations.
Parity isn't just for prime problems. Whenever you have a linear equation like 5f + 2t = 17 and one coefficient is even, the parity of the other side tells you the parity of the remaining variable — instantly halving the search.
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.
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 hint
Show solution
- 85 is odd, so one prime is even ⇒ it must be 2.
- The other prime: 85 − 2 = 83 (prime).
- Product: 2 × 83 = 166.
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 pair must include a multiple of 3 (a 3 or a 6) and an even number.
- Sum 6 comes only from (1,5), (2,4), (3,3) — products 5, 8, 9, none a multiple of 6. So 6 is impossible.
- Every other choice has a good pair: 5 = (2,3)→6, 7 = (1,6)→6, 8 = (2,6)→12, 9 = (3,6)→18.
- 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 · #13 If n and m are integers and n2 + m2 is even, which of the following is impossible?
If n and m are integers and n2 + m2 is even, which of the following is impossible?
Show answer
Show hint
Show solution
- n2 + m2 even ⇒ n2 and m2 have the same parity ⇒ n and m have the same parity.
- Same parity ⇒ n + m is always even, never odd.
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 hint
Show solution
- 250 = 2 · 53. Two smallest (and only) primes: 2 and 5.
- Sum: 2 + 5 = 7.
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.
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.
Sekou writes down the numbers 15, 16, 17, 18, 19. After he erases one of his numbers, the sum of the remaining four numbers is a multiple of 4. Which number did he erase?
Sekou's five numbers: 15, 16, 17, 18, 19. Their remainders mod 4:
- 15 ÷ 4 = 3 remainder 3
- 16 ÷ 4 = 4 remainder 0
- 17 ÷ 4 = 4 remainder 1
- 18 ÷ 4 = 4 remainder 2
- 19 ÷ 4 = 4 remainder 3
Total of remainders: 3 + 0 + 1 + 2 + 3 = 9. And 9 mod 4 = 1. So all five numbers together leave a remainder of 1 when divided by 4.
For the remaining four numbers (after erasing one) to sum to a multiple of 4, the erased number must equal the current total's remainder mod 4. The total is 1 mod 4. So we erase the number with remainder 1 mod 4 — that's 17.
You never had to actually add the five numbers (15+16+17+18+19 = 85, then check 85−x ≡ 0 mod 4). The mod-4 approach skips the addition. Track the remainders, find the one that needs to leave.
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.
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
- Since 700 is a multiple of 7, after 700 days the weekday is again Saturday.
- Six more days past Saturday lands on Friday.
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 →
Show solution
- Last digit 3, so N ∈ {13, 23, 33, 43, 53, 63, 73, 83, 93}.
- Sum-of-digits test for mod 9: only 73 has digit sum 10 ≡ 1 (mod 9). So N = 73.
- 73 mod 11: 11 × 6 = 66, remainder 7. Answer: 7.
2019 · #14 Isabella has 6 coupons that can be redeemed for free ice cream cones at Pete's Sweet Treats. In order to make the coupons last, she...
Isabella has 6 coupons that can be redeemed for free ice cream cones at Pete's Sweet Treats. In order to make the coupons last, she decides that she will redeem one every 10 days until she has used them all. She knows that Pete's is closed on Sundays, but as she circles the 6 dates on her calendar, she realizes that no circled date falls on a Sunday. On what day of the week does Isabella redeem her first coupon?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 10 days advances the day-of-week by 10 mod 7 = 3 days. So the six redemption days have day-of-week offsets {0, 3, 6, 2, 5, 1} mod 7 from the start.
- These 6 offsets cover everything except offset 4. Sunday must be that missing offset, so start day is Sunday − 4 days.
- Counting back from Sunday: Sat, Fri, Thu, Wed.
2022 · #17 If n is an even positive integer, the double-factorial notation n!! represents the product of all the even integers from 2 to n. For...
If n is an even positive integer, the double-factorial notation n!! represents the product of all the even integers from 2 to n. For example: 8!! = 2 × 4 × 6 × 8. What is the units digit of the following sum?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- n!! for n ≥ 10 contains the factor 10, so its units digit is 0.
- Compute only the survivors: 2!! = 2, 4!! = 8, 6!! = 48, 8!! = 384. Their units digits: 2, 8, 8, 4.
- Sum of units digits: 2 + 8 + 8 + 4 = 22. Units digit: 2.
1988 · #10 Chris's birthday is on a Thursday this year. What day of the week will it be 60 days after her birthday?
Chris's birthday is on a Thursday this year. What day of the week will it be 60 days after her birthday?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 60 days = 8 full weeks plus 4 extra days.
- 4 days after Thursday → Friday, Saturday, Sunday, Monday.
1985 · #20 In a certain year, January had exactly four Tuesdays and four Saturdays. On what day did January 1 fall that year?
In a certain year, January had exactly four Tuesdays and four Saturdays. On what day did January 1 fall that year?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The three weekdays starting on Jan 1 each appear 5 times in a 31-day January. For Tue and Sat both to appear only 4 times, neither can be in those first three weekdays.
- Only starting on Wednesday (Wed, Thu, Fri) leaves both Tue and Sat out of that group.
Stretch test
Five harder number-theory problems. Each one combines two or three of the habits above.
2017 · #12 The smallest positive integer greater than 1 that leaves a remainder of 1 when divided by 4, 5, and 6 lies between which of the...
The smallest positive integer greater than 1 that leaves a remainder of 1 when divided by 4, 5, and 6 lies between which of the following pairs of numbers?
Show answer
Show hint
Show solution
- n − 1 is divisible by 4, 5, and 6, so by lcm(4, 5, 6) = 60.
- Smallest n > 1: n = 61, which lies between 60 and 79.
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, so 643 ≤ 218 + 1 ✓. Cubes at base ≥ 65 exceed the range.
- Lower end: 63 = 216 < 257 = 28 + 1, but 73 = 343 ≥ 257 ✓. Smallest valid base: 7.
- Count integers from 7 to 64 inclusive: 64 − 7 + 1 = 58.
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
- A 4-digit number ending in 99 plus 1 ends in 00. So that perfect square = (10k)2, and our number is (10k)2 − 1 = (10k − 1)(10k + 1).
- Four-digit range gives 10k ∈ {40, 50, 60, 70, 80, 90, 100}.
- We need both 10k − 1 and 10k + 1 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 works. Exactly 1.
2018 · #13 Laila took five math tests, each worth a maximum of 100 points. Laila's score on each test was an integer between 0 and 100, inclusive....
Laila took five math tests, each worth a maximum of 100 points. Laila's score on each test was an integer between 0 and 100, inclusive. Laila received the same score on the first four tests, and she received a higher score on the last test. Her average score on the five tests was 82. How many values are possible for Laila's score on the last test?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Average 82 over 5 tests ⇒ total = 410. Let f = first-four score, l = last. Then 4f + l = 410 with f < l ≤ 100.
- l > 82 (else 4f + l would need f ≥ l).
- Mod 4: 4f ≡ 0, 410 ≡ 2 ⇒ l ≡ 2 (mod 4). In (82, 100]: l ∈ {86, 90, 94, 98}.
- 4 values.
1989 · #22 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...
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?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The 6 letters come back after 6 cycles; the 4 digits come back after 4 cycles.
- Both line up together at the smallest common multiple: LCM(6, 4) = 12.
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)·…
- 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).
- 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.
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. - Sum of divisors of
n = pa · qb:σ(n) = (1 + p + p² + … + pa) · (1 + q + q² + … + qb). So σ(112) = σ(2⁴ · 7) = (1+2+4+8+16) · (1+7) = 31 · 8 = 248. - 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.) - 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).