AMC 10 Step by Step

2017 AMC 10A Problem 25

P21-25~12 minPrint

How many integers between 100100 and 999999 , inclusive, have the property that some permutation of its digits is a multiple of 1111 between 100100 and 999?999? For example, both 121121 and 211211 have this property.

Log in to save your progress.
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 1111.

1. A three-digit number with digits p,q,rp, q, r (in that order) is a multiple of 1111 exactly when p−q+rp - q + r is a multiple of 1111. For digits, p−q+rp - q + r is between −9-9 and 1818, so it must be 00 or 1111.
- p−q+r=0p - q + r = 0 means the middle digit is the sum of the outer two. Example: 121121, since 1+1=21 + 1 = 2.
- p−q+r=11p - q + r = 11 means the middle digit is the sum of the outer two minus 1111. Example: 209209, since 2+9−11=02 + 9 - 11 = 0.
2. So a set of three digits works when one digit equals the sum of the other two, or that sum minus 1111. (Put that digit in the middle. You can always choose the order of the outer two so the number does not start with 00.)

Step 2: count sets and their arrangements. Split by whether a digit repeats and whether 00 appears, because that changes how many arrangements there are.

3. Three different nonzero digits. Each such set can be written in 66 orders.
- One digit is the sum of the other two, u+vu + v with u<vu < v. For sums 3,4,5,6,7,8,93, 4, 5, 6, 7, 8, 9 the pairs number 1,1,2,2,3,3,41, 1, 2, 2, 3, 3, 4 (for example, sum 77: 1+6,2+5,3+41{+}6, 2{+}5, 3{+}4). That is 1616 sets.
- One digit is u+v−11u + v - 11. The sum must be 1212 to 1717 for this to be a nonzero digit. The pairs number 3,3,2,2,1,13, 3, 2, 2, 1, 1 (for example, sum 1212: 3+9,4+8,5+73{+}9, 4{+}8, 5{+}7, each with third digit 11). That is 1212 sets.
- No set is in both lists. Total 2828 sets, giving 28×6=16828 \times 6 = 168 numbers.
4. A repeated nonzero digit, like d,d,ed, d, e. Each set can be written in 33 orders.
- e=d+de = d + d: d=1,2,3,4d = 1, 2, 3, 4 (sets 112,224,336,448112, 224, 336, 448).
- e=d+d−11e = d + d - 11: d=6,7,8,9d = 6, 7, 8, 9 (third digit 1,3,5,71, 3, 5, 7).
- Total 88 sets, giving 8×3=248 \times 3 = 24 numbers.
5. A zero and two different nonzero digits 0,u,v0, u, v. The only way to fit the rule is u+v−11=0u + v - 11 = 0, so u+v=11u + v = 11: the pairs 2+9,3+8,4+7,5+62{+}9, 3{+}8, 4{+}7, 5{+}6. That is 44 sets. Each makes 44 three-digit numbers (six orders, minus the two that start with 00): 4×4=164 \times 4 = 16 numbers.
6. A zero and a repeated digit 0,d,d0, d, d. Always works, because d=d+0d = d + 0 (the number d d 0d\,d\,0 has d−d+0=0d - d + 0 = 0). There are 99 sets (d=1d = 1 to 99), each making 22 numbers (dd0dd0 and d0dd0d): 9×2=189 \times 2 = 18 numbers.
7. Add: 168+24+16+18=226168 + 24 + 16 + 18 = 226.

The answer is (A) 226\boxed{\textbf{(A)}\ 226}.

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 1111. The "first minus middle plus last" test for 1111 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 p,q,rp, q, r is a multiple of 1111 exactly when p−q+r∈{0,11}p - q + r \in \{0, 11\}: the middle digit is the sum of the outer two, or that sum minus 1111. 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 1111; 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 u+vu + v with u<vu < v, u+v≤9u + v \le 9: sums 33 through 99 give 1,1,2,2,3,3,41, 1, 2, 2, 3, 3, 4 pairs, total 1616. Or one digit is u+v−11u + v - 11 with u+v≥12u + v \ge 12: sums 1212 to 1717 give 3,3,2,2,1,13, 3, 2, 2, 1, 1 pairs, total 1212. No set is counted twice (that would force 2u=112u = 11). 2828 sets, 66 arrangements each: 168168.

A repeated nonzero digit {d,d,e}\{d, d, e\}. Need e=2de = 2d (d=1,2,3,4d = 1, 2, 3, 4) or e=2d−11e = 2d - 11 (d=6,7,8,9d = 6, 7, 8, 9): 88 sets, 33 arrangements each: 2424.

A zero with two distinct nonzero digits {0,u,v}\{0, u, v\}. Need u+v=11u + v = 11: {2,9},{3,8},{4,7},{5,6}\{2,9\}, \{3,8\}, \{4,7\}, \{5,6\}. 44 sets, 44 arrangements each (zero not in front): 1616.

A zero with a repeated digit {0,d,d}\{0, d, d\}. Always good since d=0+dd = 0 + d (e.g. dd0dd0): 99 sets, 22 arrangements each: 1818.

Total: 168+24+16+18=226168 + 24 + 16 + 18 = 226.

The answer is (A) 226\boxed{\textbf{(A)}\ 226}.

Review in the AoPS books

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.