EDIT: I've found my mistake. Flipped around the values because in my head I had them tails up at the start.. Not sure what to do with the question now...
On a table there are three coins in a row, all heads side up. On each turn Lilach flips one coin. The left one with probability $1/2$, the middle $1/3$ and the right one with probability $1/6$, independently of other turns. Denote by $X_{n}$ the number of heads facing up after $n$ turns. Calculate the expected value of $X_{3}$.
Using the fact that expected value is a linear function, and a fact proven earlier that if $X\sim \rm{bin}(n,p)$ is a random variable, then $$P(X\text { is even})=\frac{1}{2}(1+(1-2p)^n)$$ I arrived at the following solution:
Letting $Y_{n,i}$ be a random variable equal to the number times coin $i$ was flipped during the first $n$ turns. Then for each $1\leq i\leq3$, $Y_{n,i}\sim{\rm Bin}\left(n,p_{i}\right)$ (where $p_{i}$ is the probability of coin $i$ being flipped, from left to right).
Now denoting by $A_{n,i}$ the random variable equal $1$ if coin $i$ is face up and $0$ if it's face down after $n$ flips, we have that $$P\left\{ A_{n,i}=1\right\} =\frac{1}{2}\left(1+\left(1-2p_{i}\right)^{n}\right)$$ and similarly $$E\left[A_{n,i}\right]=\frac{1}{2}\left(1+\left(1-2p_{i}\right)^{n}\right)$$
But $X_{n}=\sum_{i=1}^{3}A_{n,i}$, thus $$E\left[X_{n}\right]=\sum_{i=1}^{3}E\left[A_{n,i}\right]=\frac{1}{2}\left(1+\left(1-1\right)^{n}\right)+\frac{1}{2}\left(1+\left(1-\frac{2}{3}\right)^{n}\right)+\frac{1}{2}\left(1+\left(1-\frac{1}{3}\right)^{n}\right)$$
or
$$E\left[X_{n}\right]=\frac{1}{2}\left(3+\left(\frac{1}{3}\right)^{n}+\left(\frac{2}{3}\right)^{n}\right)=\frac{1}{2}\left(3+\frac{1+2^{n}}{3^{n}}\right)$$
Setting $n=3$ we get
$$E\left[X_{3}\right]=\frac{1}{2}\left(3+\frac{1+8}{27}\right)=\frac{3}{2}+\frac{1}{6}=\frac{10}{6}$$
The problem is that this breaks down for $n=1$, as $P\{X_1=1\}=1$, but the expected value I get from the formula is $2$, and I'm not sure where exactly it broke down. I'm pretty certain that I can say that
$$X_n=\sum_i=1^3 A_{n,i}$$
it doesn't tell me much on the distribution of $X_n$ as these variables are dependent, but when looking at expected value the linearity should work even when the variables are indeed dependent, shouldn't it? So where is my mistake?
I have solved it using Markov Chain. I am not sure about the formula that you have used and how you got it. If you know Markov Chain, you shall be able to follow the solution easily. I have given the hand-written image and the computation image for your perusal. Goodluck

Edit
Based on Dr Scott's advice, I have modeled it as eight states and the transition matrix is much easier to draw and the expected number of heads given the intial state to be HHH is $\boxed{2}$