<s>[INST] Decreasing sequence numbers with first digit $9$ 
Find the sum of all positive integers whose digits (in base ten) form a strictly decreasing sequence with first digit $9$.

The method I thought of for solving this was very computational and it depended on a lot of casework. Is there a nicer way to solve this question?
Note that there are $\displaystyle\sum_{n=0}^{9} \binom{9}{n} = 2^9$ such numbers.
 [/INST] If the digit with value $10^j$ is $k$, there are $\binom kj$ options for the digits after that and $2^{8-k}$ options for the digits before that (corresponding to the subsets of the digits between $k$ and $9$), except for $k=9$ there is $1$ option for the digits before (namely none). Thus the sum of the contributions from the $10^j$ digit is
$$
10^j\left(\sum_{k=0}^8k\binom kj2^{8-k}+9\binom9j\right)\;,
$$
and the sum of the contributions from all digits is
\begin{align}
\sum_{j=0}^910^j\sum_{k=0}^8\left(k\binom kj2^{8-k}+9\binom9j\right)
&=
\sum_{k=0}^8k\cdot11^k2^{8-k}+9\cdot11^9
\\
&=
2^8\cdot q\frac{\mathrm d}{\mathrm dq}\left.\frac{q^9-1}{q-1}\right|_{q=\frac{11}2}+9\cdot11^9
\\
&=
2^8\cdot\frac{11}2\cdot\frac{8\left(\frac{11}2\right)^9-9\left(\frac{11}2\right)^8+1}{\left(\frac{11}2-1\right)^2}+9\cdot11^9
\\
&=23259261861\;.
\end{align}
Here's code to check this result.
</s>