If we receive a flow of bits of a particular length, how to describe it in function of the length L?

I am interested in the description of the probability of receiving the sequence "10".

p1: Probability of receiving 1

p0: Probability of receiving 0

px: Probability of receiving whatever

If L=3, we can have:

10x

x10

so, the probability is p=2*p1*p0*px

If L=4,

10xx

x10x

xx10

1010

Here, the probability is p=3*p1*p0*(px^2)+(p1*p0)^2

If L=5,

10xxx

x10xx

xx10x

xxx10

1010x

10x10

x1010

In this case, p=4*p1*p0*(px^3)+3*((p1*p0)^2)*px

...

How to describe the probability in general, using L as variable???