Of all the positive integers that contain all ten digits (no leading zeros), arranged in ascending order, what is the millionth number on the list?
Computer solutions are welcome, but an analytic solution is even better.
As [9! x
3] > 1,000,000 > [9! x (
3 - 1)], the 1st digit is the
3rd digit (ignoring 0 in the count, as 0 can not be the first digit) of the set of ascending digits {0, 1, 2,
3, 4, 5, 6, 7, 8, 9}, i.e., 3.
1,000,000 - [9! x (
3 - 1)] = 274,240
As [8! x
7] > 274,240 > [8! x (
7 - 1)], the 2nd digit is the
7th digit of the set of the remaining ascending digits {0, 1, 2, 4, 5, 6,
7, 8, 9}, i.e., 7.
274,240 - [8! x (
7 - 1)] = 32,320
As [7! x
7] > 32,320 > [7! x (
7 - 1)], the 3rd digit is the
7th digit of the set of the remaining ascending digits {0, 1, 2, 4, 5, 6,
8, 9}, i.e., 8.
32,320 - [7! x (
7 - 1)] = 2,080
As [6! x
3] > 2,080 > [6! x (
3 - 1)], the 4th digit is the
3rd digit of the set of the remaining ascending digits {0, 1,
2, 4, 5, 6, 9}, i.e., 2.
2,080 - [6! x (
3 - 1)] = 640
As [5! x
6] > 640 > [5! x (
6 - 1)], the 5th digit is the
6th digit of the set of the remaining ascending digits {0, 1, 4, 5, 6,
9}, i.e., 9.
640 - [5! x (
6 - 1)] = 40
As [4! x
2] > 40 > [4! x (
2 - 1)], the 6th digit is the
2nd digit of the set of the remaining ascending digits {0,
1, 4, 5, 6}, i.e., 1.
40 - [4! x (
2 - 1)] = 16
As [3! x
3] > 16 > [3! x (
3 - 1)], the 7th digit is the
3rd digit of the set of the remaining ascending digits {0, 4,
5, 6}, i.e., 5.
16 - [3! x (
3 - 1)] = 4
As [2! x
3] > 4
= [2! x (
3 - 1)], the 8th digit is, then, the
2nd digit of the set of the remaining ascending digits {0,
4, 6}, i.e., 4, and the remaining two digits would be in the remaining two digits in descending sequence:
6 and
0.
The millionth pandigital number is
3,782,915,460.
Edited on April 20, 2009, 1:02 am
|
Posted by Dej Mar
on 2009-04-17 20:16:18 |