A fair (6-sided) die is rolled repeatedly and independently. Let X be the number of times the die is rolled until the pattern $11$ appears (i.e. there are two consecutive rolls of 1). In the definition of X, we count the two last rolls of 1 and 1. Let $Y$ be the number of times the die is rolled until the pattern 12 appears (we count the two last rolls of 1 and 2). Find the expected values of $X$ and $Y$.
Let $Z$ be the number of rolls until the first 1 occurs and let $W$ be the number of rolls until the first non-1 occurs. Let $E(\cdot )$ denote expected value. We know that $E(Z) = \sum_{i=0}^\infty (5/6)^i \cdot 1/6\cdot (i+1) =\dfrac{1/6}{1-5/6} + 1/6 \cdot \dfrac{5/6}{(1-5/6)^2} = 6$ and $E(W) = \sum_{i=0}^\infty (2/6)^i \cdot 5/6\cdot (i+1)=\dfrac{5/6}{1-1/6} + 5/6 \cdot \dfrac{1/6}{(1-1/6)^2} = 6/5$. Observe that $E(X) = 1/6 (E(Z) + 1) + 5/6(E(Z) + 1 + E(X)),$ since the first time the pattern 11 occurs, either 1) the first one in the pattern is the first one in the sequence of rolls or 2) the first one occurred earlier, is followed by a non-one, and the probability that 11 occurs later in the sequence is the same if 1x is encountered first for some $x\neq 1$ compared to if 1x is not encountered before 11. In case 1, the expected value is $1/6 (E(Z)+1)$ and in case 2, it is the other term. I'm not sure how to come up with a recurrence for $E(Y)$ though; I think the following equation is wrong: $E(Y) = 1/6(E(Z) + 1) + 4/6(E(Z) + 1 + E(Y)) + 1/6(E(Z) + 1 + E(W) + E(Y))$. The reason why I think this equation is wrong is because $1/6(E(Z) + 1 + E(W) + E(Y))$ counts sequences up to the first 1, which is followed by a 1 and some other terms and a non-1. The non-1 can be a 2.