- 29,302
- 20,969
And with ##p## as the probability of throwing a head we have:
$$N_0 = 1 + pN_1 + (1-p)N_0, \dots$$Which leads to:
$$N_1 = N_0 - \frac 1 p, \ N_2 = N_0 - \frac 1 p - \frac 1 {p^2}, \ N_3 = N_0 - \frac 1 p - \frac 1 {p^2} - \frac 1 {1-p}$$And$$N_3 = 1 + pN_0$$Which leads to the same result as before:
$$N_0 = \frac{1 + p^2 - p^3}{p^3(1-p)}$$
$$N_0 = 1 + pN_1 + (1-p)N_0, \dots$$Which leads to:
$$N_1 = N_0 - \frac 1 p, \ N_2 = N_0 - \frac 1 p - \frac 1 {p^2}, \ N_3 = N_0 - \frac 1 p - \frac 1 {p^2} - \frac 1 {1-p}$$And$$N_3 = 1 + pN_0$$Which leads to the same result as before:
$$N_0 = \frac{1 + p^2 - p^3}{p^3(1-p)}$$