How many even, three-digit positive integers have the property that two of the digits are equal?
This is just to give an explanation for I's answer:
If the two equal digits are both 0, they must be found in the last two positions, while there are nine
possibilities for the first digit: 100, 200, 300, 400, 500, 600, 700, 800, 900.
If the two equal digits are both 1, they must be found in the first two position, while there are five
possibilities for the last digit: 110, 112, 114, 116, 118.
(The same is true if the two equal digits are both 3, 5, 7, and 9; for a total of twenty five.)
If the two equal digits are both 2:
-- if they are in the last two positions, there are 8 possibilities for the first position:
122, 322, 422, 522, 622, 722, 822, and 922.
(The same is true if the two equal digits are both 4, 6, and 8; for a total of thirty two.)
-- if they are in the first and third position, there are 9 possibilities for the second position:
202, 212, 232, 242, 252, 262, 272, 282, and 292.
(The same is true if the two equal digits are both 4, 6, and 8; for a total of thirty six.)
-- if they are in the first and second position, there are 4 possibilites for the third position:
220, 224, 226, and 228.
(The same is true if the two eaual digits are both 4, 6, and 8; for a total of sixteen.)
When I total these, I get: 9 + 25 + 32 + 36 + 16 = 118.