[Math] How many number of three digit numbers lying between 100 and 999 (inclusive) and having only two consecutive digits identical

combinatorics

Please suggest a suitable approach for this problem.

Best Answer

In your comment, you said that the given solution was 9 • 9 + 1 • 9 + 8 • 9 = 162. I'll attempt to explain a logic that yields that calculation.

Consider the 3-digit numbers that start with two identical digits. There are 9 choices of the first digit (and inherently the second digit): 11, 22, 33, 44, 55, 66, 77, 88, and 99 (not 00 because the number is in the range 100-999). For each of these, there are 9 choices of the final digit (0-9, except whatever digit was already chosen for the first two). So, there are 9 • 9 such numbers.

Now, suppose that the number ends with two identical digits. There are 10 choices for the last digit (and inherently the second-to-last digit): 00, 11, 22, 33, 44, 55, 66, 77, 88, and 99, but we need to treat 00 separately from the rest. If the number ends with 00, then the first digit can be 1-9, so 9 choices, so 1 • 9. If the number ends with 11-99, there are 8 choices of first digit (1-9 except the digit already chosen), so 9 • 8.

While I have the 8 and 9 transposed in the final term, this is term-by-term the same expression as in the solution you gave.