How many n-digit decimal sequences (using digits 0-9) are there with k 1s?

I'm not entirely sure what you question is asking, but I'll take a guess.
You have n digits and k 1's with k<n
There are n choose k ways to arrange the 1's in your number.
You now have n-k places to choose the other 9 numbers. There are two cases to consider: when the fist digit is 1 and when it isn't. If it's not 1 then there are only 8 digits you can use, since a number wouldn't have 0 in the lead position. If it is a 1 then there are 9 possible choices for each of the n-k position or 9n-k * n choose k numbers. I'll let you finish it for the case when it's not a 1 in the first place, then add the two together for the total.

I see someone else posted this question too and they said leading 0's are acceptable, so you can disregard part of the previous post if you have the same quesiton as them.
There are n choose k ways to arrange the 1's and 9n-k ways to select the other numbers, so
n choose k * 9n-k total numbers here.

To find the number of n-digit decimal sequences with k 1's, we can use a combination of counting techniques.

First, let's consider the positions of the 1's. We need to choose k positions out of the n available positions for the 1's. This can be done using the concept of combinations, specifically n choose k.

The number of ways to choose k positions out of n is given by the formula C(n, k) = n! / (k! * (n-k)!), where "!" represents the factorial of a number.

Next, we need to consider the remaining positions in the sequence. Since we are using decimal digits (0-9), each of the remaining positions can be filled with any of the 9 remaining digits (excluding the 1's). Therefore, for each of the remaining positions, we have 9 choices.

Considering that the remaining positions can be filled independently, we can find the total number of sequences by multiplying the number of choices for each position.

If the first position can also be filled with 0, then each of the remaining n-k positions has 10 choices (0-9). In this case, the total number of sequences would be: C(n, k) * 10^(n-k).

If the first position cannot be filled with 0 (leading 0's are not allowed), then each of the remaining n-k positions only has 9 choices (1-9). In this case, the total number of sequences would be: C(n, k) * 9^(n-k).

So, depending on whether leading 0's are allowed or not, the total number of n-digit decimal sequences with k 1's would be given by:

1. If leading 0's are allowed: C(n, k) * 10^(n-k)
2. If leading 0's are not allowed: C(n, k) * 9^(n-k)

Note that in both cases, k must be less than n for there to be enough positions for the 1's.