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

1s?

Decimal sequences meaning you can have as many 0s in front of a number. For example:
000001234557891111 would be consider valid. So how do i come up with an equation?

See my response to Sana's question right below yours.

To find the number of n-digit decimal sequences with k 1s, we can use combinatorics and consider the placement of the 1s in the sequence.

First, let's determine the number of positions in the sequence where the 1s can be placed. Since the sequence has n digits, there are n possible positions.

Next, we need to choose k positions from these n positions to place the 1s. This can be done using combinations. The formula for combinations is given by:

C(n, k) = n! / (k! * (n - k)!)

where "n!" denotes the factorial of n.

Finally, we need to consider the remaining digits in the sequence. Since the remaining digits can be any of the available digits (0-9) excluding 1, there are 9 choices for each remaining digit. Therefore, for each choice of k positions for the 1s, there are 9^(n-k) options for the remaining digits.

Putting all this together, the number of n-digit decimal sequences with k 1s is given by the equation:

Number of sequences = C(n, k) * 9^(n-k)

You can plug the values of n and k into this equation to compute the number of sequences you are interested in.