2017 AMC 10A Problem 25
How many integers between and , inclusive, have the property that some permutation of its digits is a multiple of between and For example, both and have this property.
Show solution without answering
Key insight
A three-digit number is a multiple of 11 when first minus middle plus last is 0 or 11. So one digit is the others' sum, or that sum minus 11.
Solution
Whether a number has the property depends only on which digits it uses, not their order. So first find which sets of digits work, then count how many three-digit numbers each set makes.
Step 1: the test for .
1. A three-digit number with digits (in that order) is a multiple of exactly when is a multiple of . For digits, is between and , so it must be or .
- means the middle digit is the sum of the outer two. Example: , since .
- means the middle digit is the sum of the outer two minus . Example: , since .
2. So a set of three digits works when one digit equals the sum of the other two, or that sum minus . (Put that digit in the middle. You can always choose the order of the outer two so the number does not start with .)
Step 2: count sets and their arrangements. Split by whether a digit repeats and whether appears, because that changes how many arrangements there are.
3. Three different nonzero digits. Each such set can be written in orders.
- One digit is the sum of the other two, with . For sums the pairs number (for example, sum : ). That is sets.
- One digit is . The sum must be to for this to be a nonzero digit. The pairs number (for example, sum : , each with third digit ). That is sets.
- No set is in both lists. Total sets, giving numbers.
4. A repeated nonzero digit, like . Each set can be written in orders.
- : (sets ).
- : (third digit ).
- Total sets, giving numbers.
5. A zero and two different nonzero digits . The only way to fit the rule is , so : the pairs . That is sets. Each makes three-digit numbers (six orders, minus the two that start with ): numbers.
6. A zero and a repeated digit . Always works, because (the number has ). There are sets ( to ), each making numbers ( and ): numbers.
7. Add: .
The answer is .
Why this works
When a question is about rearranging digits, the real object is the set of digits, so count those sets first and arrangements second. That avoids counting a number twice when its digits can form two different multiples of . The "first minus middle plus last" test for turns the question into a simple rule about sums of digits.
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
A three-digit number with digits is a multiple of exactly when : the middle digit is the sum of the outer two, or that sum minus . Swapping the outer digits preserves this, so a digit-set is good when one digit equals the sum of the other two, or that sum minus ; a good set can always be arranged with a nonzero leading digit. Count good sets by type, then their three-digit arrangements.
Three distinct nonzero digits. One digit is with , : sums through give pairs, total . Or one digit is with : sums to give pairs, total . No set is counted twice (that would force ). sets, arrangements each: .
A repeated nonzero digit . Need () or (): sets, arrangements each: .
A zero with two distinct nonzero digits . Need : . sets, arrangements each (zero not in front): .
A zero with a repeated digit . Always good since (e.g. ): sets, arrangements each: .
Total: .
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Number Theory, Chapter 1: Integers: The Basics (§1.4, §1.5)
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.