How to find the number of integers of the form $\overline{a_7a_6a_5...a_1}$ where $\forall i,$ $a_i\leq a_{i+1}$ and $a_7 \neq 0$

58 Views Asked by At

I need to find find the number of integers of the form $\overline{a_7a_6a_5...a_1}$ where $\forall i,$ $a_i\leq a_{i+1}$ and $a_7\neq0$

In one of my previous exercises I proved that, if you move only either right or up every turn, from the point $(0,0)$ to the point $(m,n)$ there are $\binom{m+n}{n}$ ways to get there.

So lets imagine the same thing for the numbers. If we start in $(1,0)$ as if we fixed $a_7=1$, there will be $\binom{7+0}{0}$ ways to reach $(7,1)$ (assuming that we suppose $(1,0)$ to be $(0,0)$ for the formula to work) which corresponds to the last digit being 1.

Then we proceed the same way for every other last digit possible, giving us $$\sum_{i=0}^{8}\binom{7+i}{i}$$ We proceed the same way for every possible first digit, which gives us the final formula of $$ \sum_{j=1}^{9}\sum_{i=0}^{9-j}\binom{7+i}{i} $$ This is what I have tried so far solving this problem. What am I asking here is a feedback on my reasoning, to either confirm that my logic in approaching this exercise is correct or did I make a mistake somewhere.

Any alternate solution would be welcomed as well.

1

There are 1 best solutions below

6
On BEST ANSWER

If you know the digits of your number (with multiplicity), you know your number, because the digits in your number are increasing (or staying the same) from the single digit.

So the question becomes: In how many ways can you select 7 digits, with possible repetition, from the set $\{0,1,2,3,4,5,6,7,8,9\}$?

That's a standard combinatorial question, usually called "combinations with repetition". Wikipedia has a long article about combinations, including formulas and proofs. In this case, the answer is, as there are 10 digits

$${10+7-1 \choose 7}={16 \choose 7}= 11440.$$

But wait, there was an additional condition in the problem, $a_7$ can't be zero! But since $\forall 1 \le i \le 6$ we have $a_i \le a_{i+1}$, this requires all $a_i$ to be zero. So this is just $1$ solution of the ones calculated above, so the answer to your problem is:

There are ${16 \choose 7}-1=11439$ such $7$-digit numbers.