How many times does the digit grouping “57” (in that order) appear in all of the five-digit positive integers? For instance, “57” appears once in 12,357, twice in 57,057, and does not appear in 24,675.
(A) 279
(B) 3,000
(C) 3,471
(D) 3,700
(E) 4,029
The answer is (D), but I got 3,671. I tried looking online but none of the explanations addressed my confusion: why is double-counting okay for this question?
Manhattan 5-lb gave this explanation:
This leaves 10+10+9=29 integers that are double-counted. However, it is fine that they are double-counted, because the question asks for the number of times the grouping “57” appears. These integers contain that grouping twice, so they should be counted twice, and the correct answer is 3,700.
But I don’t understand what it’s saying.
Here’s my reasoning:
First, find the number of cases where “57” appears twice.
- 9 cases in _ 5 7 5 7
- 10 cases in 5 7 _ 5 7
- 10 cases in 5 7 5 7 _
There are a total of 9+10+10=29 cases where “57” appear twice.
Second, find the number of cases where “57” appears once.
- _ _ _ 5 7 has 9\times10\times10=900 cases. But we’re double-counting 9 cases from _ 5 7 5 7 and 10 cases from 5 7 _ 5 7, so the actual number cases is 900-9-10=881.
- _ _ 5 7 _ has 9\times10\times10=900 cases. But we’re double-counting 10 cases from 5 7 5 7 _, so the actual number cases is 900-10=890.
- _ 5 7 _ _ has 9\times10\times10=900 cases. But we’re double-counting 9 cases from _ 5 7 5 7, so the actual number cases is 900-9=891.
- 5 7 _ _ _ has 10\times10\times10=1000 cases. But we’re double-counting 10 cases from 5 7 _ 5 7 and 10 cases in 5 7 5 7 _, so the actual number cases is 1000-10-10=980.
There are a total of 881+890+891+980=3642 cases where “57” appear once.
Finally, sum all cases up, and we have 29+3642=3671.