<s>[INST] How many passwords of length 8 with digits non-decreasing sequence and start with 5? Passwords have length of 8 characters.
The usable characters are the 10 digits 0,1,2,3,4,5,6,7,8,9.
How many passwords with digits only have non-decreasing sequence of digits and start with 5?
The sequence of eight digits $D_1, D_2, D_3, D_4, D_5, D_6, D_7, D_8$ is non-decreasing if $D_1 \leq D_2 \leq D_3 \leq D_4 \leq D_5 \leq D_6 \leq D_7 \leq D_8$
How can we solve this using combinations in a way that takes into account the possibilities of using any number of digits 5, 6, 7, 8 and 9.
 [/INST] One way to choose a password is to just choose where the strict increases in the password are, and how big they are. For example, the password 
(5, 5, 5, 7, 7, 7, 8, 8)
has strict increases after positions 3 and 6, the first being a jump of size 2, and the second of size 1. Also, any sequence of positions to increase at, and jump sizes at those sites of total height at most 4 -- since we can't use digits bigger than 9 -- corresponds to a password. 
One way to count these guys is to split them up first by what the last digit in the password is, i.e. how much total 'jumping' we did, and then by partitions of that number. 
For example, say the last digit is 8. Then we jumped by 3 total: the three partitions of 3 are
$3 = 1 + 1 + 1 = 2 + 1,$
and the jumps could go in any of 7 possible positions (after any of the digits in the password except the last). Thus, in this case, there are 
$\binom{7}{1} + \binom{7}{3} + 2 \binom{7}{2} = 84$ 
possible passwords.
Just do this for the other possible total jump heights 1, 2 and 3: the counts come out to 
(Total jump = 0) One password only: all 5's. 
(Total jump = 1, only partition of 1 is 1) $\binom{7}{1} = 7$.
(Total jump = 2, partitions of 2 are 2 and 1 + 1) $\binom{7}{1} + \binom{7}{2} = 28$.
(Total jump = 4, partitions of 4 are 4, 3 + 1, 2 + 2, 2 + 1 + 1, 1 + 1 + 1 + 1) $\binom{7}{1} + 2 \binom{7}{2} + \binom{7}{2} + \binom{7}{1}\binom{6}{2} + \binom{7}{4} = 210.$
Thus there are a total of $1 + 7 + 28 + 84 + 210 = 330$ such passwords. 
</s>