Anonymous

# How many numbers from the set {1,2,...,9999} use exactly two different digits?

For example: 1121 should be counted, but 3333 and 1231 should not.

### 2 Answers

Relevance

- 9 years agoBest Answer
count all occurences of each:

9 possibilities for a, (1-9)

9 possibilities for b, (0-9) minus whatever a is.

ab: 9*9 = 81 possibilities. The same goes for each of the following:

aab, aba, abb, aaab, aaba, aabb, abaa, abab, abba, abbb

Total = 11 configurations * 81 possibilities = 891 possible number configurations.

Note: you would NOT also consider ba, baa, bab, bba, etc.

a just represents whatever the first digit is, and it can be 1-9, it's not like b being 1-9 would be any different, so doubling it would give you an incorrect result.

Still have questions? Get your answers by asking now.