All the 7-digit numbers containing each of the digits 1, 2, 3, 4, 5, 6, 7 exactly once, and not divisible by 5, are arranged in the increasing order. Find the 2000th number in this list.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I have seen this problem before! I think in some paper of RMO ..
Create an increasing list L of our seven-digit numbers. The list index starts with zero , so we want to find L 1 9 9 9 . Name the the digits of any number N in the list. The last digit must not be 5, otherwise N would be divisable by 5: N = ! ( d 6 , … , d 0 ) , d 0 = 5
The first digits are most significant - let's count the choices n k we have if we fix the first digits d 6 , … , d k . If the digit 5 is not among the the higher digits, we have k − 1 choices for d 0 and then ( k − 1 ) ! choices for the rest: n k = { k ! ( k − 1 ) ⋅ ( k − 1 ) ! 5 ∈ { d 6 , … , d k } else
Observe that our list-index can be partitioned using n k : 1 9 9 9 = 3 ⋅ 6 0 0 + 2 ⋅ 9 6 + 0 ⋅ 1 8 + 1 ⋅ 4 + 1 ⋅ 2 + 1 ⋅ 1 = 3 ⋅ 5 ⋅ 5 ! + 2 ⋅ 4 ⋅ 4 ! + 0 ⋅ 3 ⋅ 3 ! + 1 ⋅ 2 ⋅ 2 ! + 1 ⋅ 2 ! + 1 ⋅ 1 ! + 0
Similar to "decimal-to-binary" transformations, the red numbers tell us which index of the remaining smallest digits we have to choose for d k . The following table shows the iterations: d 6 : d 5 : d 4 : d 3 : d 2 : d 1 : d 0 : 3 2 0 1 1 1 0 1 1 1 2 2 2 2 2 2 2 3 3 4 5 5 5 5 6 6 6 6 6 7 7 7 7 7 7 ⇒ L 1 9 9 9 = 4 3 1 5 6 7 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
The number of 7-digit numbers with 1 in the left most place and containing each of the digits 1, 2, 3, 4, 5, 6, 7 exactly once is 6! = 720. But 120 of these end in 5 and hence are divisible by 5. Thus the number of 7-digit numbers with 1 in the left most place and containing each of the digits 1, 2, 3, 4, 5, 6, 7 exactly once but not divisible by 5 is 600. Similarly the number of 7-digit numbers with 2 and 3 in the left most place and containing each of the digits 1, 2, 3, 4, 5, 6, 7 exactly once but not divisible by 5 is also 600 each. These account for 1800 numbers. Hence 2000-th number must have 4 in the left most place. Again the number of such 7-digit numbers beginning with 41,42 and not divisible by 5 is 120 − 24 = 96 each and these account for 192 numbers. This shows that 2000-th number in the list must begin with 43. The next 8 numbers in the list are: 4312567, 4312576, 4312657, 4312756, 4315267, 4315276, 4315627 and 4315672. Thus 2000-th number in the list is 4315672.
Problem Loading...
Note Loading...
Set Loading...
The number of 7-digit numbers with 1 in the left most place and containing each of the digits 1, 2, 3, 4, 5, 6, 7 exactly once is 6! = 720. But 120 of these end in 5 and hence are divisible by 5. Thus the number of 7-digit numbers with 1 in the left most place and containing each of the digits 1, 2, 3, 4, 5, 6, 7 exactly once but not divisible by 5 is 600. Similarly the number of 7-digit numbers with 2 and 3 in the left most place and containing each of the digits 1, 2, 3, 4, 5, 6, 7 exactly once but not divisible by 5 is also 600 each. These account for 1800 numbers. Hence 2000-th number must have 4 in the left most place. Again the number of such 7-digit numbers beginning with 41,42 and not divisible by 5 is 120 − 24 = 96 each and these account for 192 numbers. This shows that 2000-th number in the list must begin with 43. The next 8 numbers in the list are: 4312567, 4312576, 4312657, 4312756, 4315267, 4315276, 4315627 and 4315672. Thus 2000-th number in the list is 4315672.