Amount of odd numbers between $4000$ and $5000$ with distinct digits and ranking of $4579$ in this sequence

720 Views Asked by At

A combinatorics question asks to compute the amount of odd numbers, with distinct digits, between $4000$ and $5000$. I computed this as $$5 \times 8 \times 7 = 280.$$

The follow-up question asks to rank these numbers from small to large and to determine the spot the number $4579$ in this sequence.

To solve this, I made the distinction between several cases:

  • second digit is even (so 0 or 2)
  • second digit is odd (1 or 3, the case where the second digit is 5 I treated separatly)
  • second digit is 5, with some more distinction: third digit is striclty smaller than 7 and then the third digit equals seven.

This is very cumbersome, so I wondered if there is a more elegant way to do this (using the amount of such numbers for example?). The correct answer should be the 147th spot.

2

There are 2 best solutions below

1
On BEST ANSWER

Working with numbers from $4600-5000$, if the second digit is even there are $1\times1\times7\times5=35$ ways. If the second digit is odd there are $1\times1\times7\times4=28$ ways. So we have $280-35-35-28-28=154$. Then there $7$ more such numbers to get to $4579$ and so $4579$ is in the $147$th position.

1
On

Maybe this is a cumbersome way... For these ascending ranges of numbers that share the same prefix / significant digits:

In the range 4000 - 4099, there are $5 \times 7$ such numbers.

In the range 4100 - 4199, there are $4 \times 7$ such numbers.

In the range 4200 - 4299, there are $5 \times 7$ such numbers.

In the range 4300 - 4399, there are $4 \times 7$ such numbers.

In the range 4400 - 4499, there are $0$ such numbers.

In the range 4500 - 4509, there are $4$ such numbers.

In the range 4510 - 4519, there are $3$ such numbers.

In the range 4520 - 4529, there are $4$ such numbers.

In the range 4530 - 4539, there are $3$ such numbers.

In the range 4540 - 4549, there are $0$ such numbers.

In the range 4550 - 4559, there are $0$ such numbers.

In the range 4560 - 4569, there are $4$ such numbers.

In the range 4570 - 4579, there are $3$ such numbers.