1998 Paper 1 Q1

Year: 1998
Paper: 1
Question Number: 1

Course: LFM Stats And Pure
Section: Combinatorics

Difficulty: 1516.0 Banger: 1500.0

Problem

How many integers between \(10\,000\) and \(100\,000\) (inclusive) contain exactly two different digits? (\(23\,332\) contains exactly two different digits but neither of \(33\,333\) and \(12\,331\) does.)

Solution

First consider \(5\) digit numbers containing at most \(2\) non-zero digits. Then there are \(\binom{9}{2}\) ways to choose the two digits, and \(2^{5}-2\) different ways to arrange them, removing the ones which are all the same. Considering all the pairs including zero, there are \(9\) ways to choose the non-zero (first) digit. There are \(2^4-1\) remaining digits where not all the numbers are the same. Finally we must not forget \(100\,000\). Therefore there are \(\binom{9}{2}(2^5-2) +9\cdot(2^4-1) + 1 = 1216\)
Rating Information

Difficulty Rating: 1516.0

Difficulty Comparisons: 1

Banger Rating: 1500.0

Banger Comparisons: 0

Show LaTeX source
Problem source
How many integers between $10\,000$ and $100\,000$ (inclusive) contain exactly two different digits? ($23\,332$ contains exactly two different digits but neither of $33\,333$ and $12\,331$ does.)
Solution source
First consider $5$ digit numbers containing at most $2$ non-zero digits. Then there are $\binom{9}{2}$ ways to choose the two digits, and $2^{5}-2$ different ways to arrange them, removing the ones which are all the same.

Considering all the pairs including zero, there are $9$ ways to choose the non-zero (first) digit. There are $2^4-1$ remaining digits where not all the numbers are the same.

Finally we must not forget $100\,000$.

Therefore there are $\binom{9}{2}(2^5-2) +9\cdot(2^4-1) + 1 = 1216$