Saturday 8 January 2011

2000th 7-digit Math Question

Someone posted the following question:
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.

Solved by Lim Li ☺☻:
Since the 7-digit number cannot be divisible by 5, the last digit cannot be 5.
If the 1st digit is fixed, there are 1x2x3x4x5x5 = 600 numbers
[1]765432 => 600th number
[2]765431 => 1200th
[3]765421 => 1800th
If the 1st and 2nd digits are fixed, there are 1x2x3x4x4 = 96 numbers
[41]76532 => 1896th
[42]76531 => 1992nd
:
[4312]756 => 1996th
[4315]267 => 1997th
[4315]276 => 1998th
[4315]627 => 1999th
[4315]672 => 2000th
Hence the 2000th number is 4315672

No comments: