AMC 10 Step by Step

2025 AMC 10B Problem 22

P21-25~6 minPrint

A seven-digit positive integer is chosen at random. What is the probability that the number is divisible by 1111 , given that the sum of its digits is 61?61?

Log in to save your progress.
Show solution without answering

Key insight

A digit sum of 61 is 2 short of seven 9s, leaving only 28 numbers. The test for 11 passes only when the whole shortfall is in even places.

Solution

Step 1: list the possible numbers. Seven 9s add to 6363. A digit sum of 6161 is 22 less, so the digits are all 9s except for a total "shortfall" of 22. That happens in two ways:
- one digit is 77 and the rest are 99: the 77 can be in any of 77 places, so 77 numbers;
- two digits are 88 and the rest are 99: choose 22 of the 77 places, (72)=21\binom72 = 21 numbers.

That is 2828 numbers, all equally likely. (None starts with 00, since every digit is at least 77.)

Step 2: the test for 11. Number the places 11 to 77 from the left. A number is a multiple of 1111 exactly when
(digits in places 1,3,5,7)−(digits in places 2,4,6)(\text{digits in places } 1, 3, 5, 7) - (\text{digits in places } 2, 4, 6)
is a multiple of 1111 (this can be 00 or negative too).

Step 3: start from 9999999. For all 9s, this difference is 4×9−3×9=94 \times 9 - 3 \times 9 = 9.
- Lowering a digit in an odd place (1, 3, 5, 7) makes the difference smaller by that amount.
- Lowering a digit in an even place (2, 4, 6) makes the difference bigger by that amount.

The total lowering is 22, so the difference is somewhere from 9−2=79 - 2 = 7 to 9+2=119 + 2 = 11. The only multiple of 1111 in that range is 1111. So we need the difference to be exactly 1111, which means all of the shortfall must be in even places.

Step 4: count the good numbers.
- One 77: it must be in place 22, 44 or 66. That gives 33 numbers.
- Two 88s: both must be in even places, (32)=3\binom32 = 3 ways. That gives 33 numbers.

So 66 of the 2828 numbers work, and the probability is
628=314.\frac{6}{28} = \frac{3}{14}.

The answer is (A) 314\boxed{\textbf{(A)}\ \frac{3}{14}}.

Why this works

A digit sum close to the largest possible value leaves very few numbers, so thinking of "how far short of all 9s" makes the list tiny. The test for 1111 adds and subtracts digits, so instead of testing 2828 numbers one by one, start from 99999999999999 and track how each lowered digit changes the result. The range 77 to 1111 leaves only one possible multiple of 1111, which settles everything.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

The sample space. Seven digits sum to at most 7⋅9=637 \cdot 9 = 63, so a digit sum of 6161 means the digits are all 99 except for a total shortfall of 22. There are exactly two ways to distribute that shortfall:

  • one digit is 77 and the other six are 99: 77 numbers, one for each position;
  • two digits are 88 and the other five are 99: (72)=21\binom{7}{2} = 21 numbers.

Every digit is at least 77, so the leading digit is never 00 and all 2828 strings are genuine seven-digit numbers. The condition leaves 2828 equally likely numbers.

The divisibility test. A number is divisible by 1111 exactly when its alternating digit sum
A=d1−d2+d3−d4+d5−d6+d7A = d_1 - d_2 + d_3 - d_4 + d_5 - d_6 + d_7
is a multiple of 1111. Four positions (1,3,5,71,3,5,7) carry a plus sign and three (2,4,62,4,6) carry a minus sign, so if every digit were 99 then
A=4⋅9−3⋅9=9.A = 4\cdot 9 - 3 \cdot 9 = 9 .

Lowering a digit in a plus position decreases AA by the same amount; lowering one in a minus position increases AA. The total shortfall is 22, so
7≤A≤11,7 \le A \le 11,
and the only multiple of 1111 in that range is 1111. So A=11A = 11, which happens exactly when the whole shortfall of 22 sits in minus (even) positions.

Counting.

  • One 77. It must occupy one of the three even positions: 33 numbers.
  • Two 88s. Both must occupy even positions: (32)=3\binom{3}{2} = 3 numbers.

That is 66 numbers out of 2828, so the probability is
628=314.\frac{6}{28} = \frac{3}{14}.

The answer is (A) 314\boxed{\textbf{(A)}\ \frac{3}{14}}.

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.