Post Number:#4 by Tasnood » Thu Jan 26, 2017 8:47 pm
We assume that a number of 7 digits where at least 3 digits are same. As for example, if we take such a number, n = 111222 and the last digit will be 1 or 2. So, total combination: $\frac{7!}{3!4!}$ for the last digit 1 and same for 2. So, like (1,2), there are {(1,3),(1,4),(1,5),...,(1,9)} and 70 combination for each. If we take {(2,3),...,(2,9)} 70 will be each. And, for (8,9) the answer is same. so, total = $70\cdot{(8+7+...+1)}$ = $70\cdot36$ = 2520.
Now, we think about 0. For n = 1111000, number of combination = $\frac{6!}{3!3!}$ = 20 and for n = 1110000, combination = $\frac{6!}{2!4!}$ = 15, because a 1 must be at first place.
Same for {2,3,...,9} and result in this case = $9\cdot{(20+15)}$ = $9\cdot35$ = 315.
The third case, if all digits are same. Then, there will be 9 digits.
In total = 2520 + 315 + 9 = 2844; the answer we desired.