N is a 12-digit base ten positive integer satisfying all the undernoted provisions:
- N contains each of the digits from 1 to 7 exactly once.
- N contains the digit 8 precisely twice.
- N contains the digit 9 exactly three times.
Determine the sum of all possible values of N.
The sum of digits for each N is 71, so the
average digit is 71/12.
So the average N is 111111111111 * 71/12 = 657407407406.75
How many such 12 digit numbers are there?
There are comb(12,7) ways of selecting the locations for the digits 1-7 and then 7! ways of filling those 7 spots with the digits 1-7.
There are 5 spaces remaining, 2 of which will be 8 and the other 3 will be 9; and there are comb(5,2) ways of assigning 2 of those spots to be 8.
comb(12,7) * 7! * comb(5,2) = 792 * 7! * 10 = 3991680 * 10 = 39,916,800
657407407406.75 * 39,916,800 =
26,241,599,999,973,758,400 = the sum of all possible values of N
|
Posted by Larry
on 2023-05-14 08:11:45 |