Consider all -digit numbers formed using distinct digits from the set . If these numbers are arranged in ascending order, what is the rank of the number among those that are divisible by ?
A
Step-by-Step Solution
Key idea: This is a lexicographical ranking problem with a divisibility constraint. We must first identify which subsets of digits yield a sum divisible by , then count how many valid numbers precede .
Step 1: Identify valid -digit subsets.
The sum of all digits is .
A -digit number is formed by omitting one digit . The sum of its digits is .
For the sum to be divisible by , must be a multiple of , which means must be a multiple of .
Thus, .
Case 1: Omit . Digits used: .
Case 2: Omit . Digits used: .
Step 2: Count valid numbers strictly less than .
The target uses digits , so it belongs to Case 2.
- Numbers starting with : Can be from Case 1 or Case 2. Each has permutations. Total = .
- Numbers starting with : Similarly, .
- Numbers starting with : Case 1 doesn't contain . Case 2 has . Total = .
- Numbers starting with and less than :
- From Case 1 ():
- : .
- : .
- : Remaining digits . Numbers are . Both are . So .
Total Case 1 = .
- From Case 2 ():
- : .
- : .
- : .
- : Remaining digits . Numbers are . Strictly less is .
Total Case 2 = .
Step 3: Calculate the rank.
Total numbers before .
Rank = .
Answer: 139