1983 AIME Problems/Problem 10
Problem
The numbers , , and have something in common. Each is a four-digit number beginning with that has exactly two identical digits. How many such numbers are there?
Solution
Suppose the two identical digits are both one. Since the thousands digits must be one, the other one can be in only one of three digits,
Because the number must have exactly two identical digits, , , and . Hence, there are numbers of this form.
Suppose the two identical digits are not one. Therefore, consider the following possibilities,
Again, , , and . There are numbers of this form too.
Thus, the desired answer is .