[Math] How many numbers with all different digits are between $1000$ and $4600$

combinatorics

To answer this question my thought was to solve the problem by parts.
So, first I counted how many numbers with all different digits there are less than $4000$:

For the first position (left to right) there are $4$ possibilities $(0,1,2,3)$. For the second position there are $9$, for the third they are $8$ and for the last we have $7$. Multiplied all possibilities, $4 \cdot9\cdot8\cdot7=2016$.

Then I counted how many numbers with all different digits there are less than $1000$. In this case one have at most $3$ positions. For the first position there are $10$ possibilities $(0,1,2,…,8,9)$, on the second position there are $9$ possibilities and the last position have $8$ possibilities. So, $10 \cdot9\cdot8=720$

Making the difference, $2016-720$, we get $1296$. Now I will counted the numbers with all different digits between $4000$ and $4600$:

In this part I will counted for less than $4600$, until $4599$. For the first position there is only one possibility. For the second position there are $5$, $(0,1,2,3,5)$. For the third position there are $8$ and the last position have $7$ possibilities. So $1 \cdot5\cdot8\cdot7=280$.

Finally there are $1296+280=1576$ numbers with all different digits between $1000$ and $4600$. Is my thought correct? Thanks

Best Answer

We consider two cases:

  1. The positive integer is at least $1000$ but less than $4000$. We have three choices for the thousands digit ($1$, $2$, or $3$), nine choices for the hundreds digit (since we must exclude the thousands digit), eight choices for the tens digit (since we must exclude both the thousands digit and the hundreds digit), and seven choices for the units digit (since we must exclude the thousands digit, the hundreds digit, and the tens digit), giving a total of $3 \cdot 9 \cdot 8 \cdot 7 = 1512$ four digit positive integers with distinct digits less than $4000$.

  2. The number is at least $4000$ and at most $4600$. As you determined, there is one choice for the thousands digit (namely, $4$), five choices for the hundreds digit ($0$, $1$, $2$, $3$, $5$), eight choices for the tens digit, and seven choices for the units digit, which yields $1 \cdot 5 \cdot 8 \cdot 7 = 280$ four digit positive integers with distinct digits between $4000$ and $4600$ inclusive.

Thus, there are $1512 + 280 = 1792$ positive integers $n$ satisfying the inequalities $1000 \leq n \leq 4600$ with distinct digits.

Related Question