Swap coins between bags, expected value of both bags after $10$ turns Here's a question from my probability book:

One of two bags contains ten one dollar coins, and the other ten nickels. One coin is taken out of each and placed in the other. This is repeated ten times. What is now the expectation of each bag?

It's clear the expectations of each bag after the first turn are ${{181}\over{20}}$ and ${{29}\over{20}}$, and a calculation shows after the second turn the expectations are ${{829}\over{100}}$ and ${{221}\over{100}}$. But I don't see a pattern yet nor see a clever way to do this problem without brute force calculating it out all the way up to ten turns. I'm wondering if anyone can help me out here.
 A: The linearity of expectation is your friend.
If $X$ is the number of dollar coins in the first bag after 10 swaps, then there are $10-X$ nickels, and the amount of money is $X+0.1(10-X)=0.9X+0.1$. The expected amount of money is $E(0.9X+0.1)=0.9E(X)+0.1$. So we may as well focus on $E(X)$.
Say we mark each dollar coin with a number from 1 to 10, so we can tell them apart after all the swaps have happened. Let $X_i$ be the random variable "$1$ if coin $i$ is in the first bag after 10 swaps, and $0$ otherwise". Then $$X=X_1+X_2+\cdots+X_{10}\\
E(X)=E(X_1)+E(X_2)+\cdots+E(X_{10})$$
Each of these ten expectations are equal, so we actually have $E(X)=10E(X_1)=10P(X_1=1)$.
Calculating $P(X_1=1)$ can be done in several ways. You could split it into the probabilities of being swapped 0, 2, 4, 6, 8 or 10 times, and calculate each one with standard binomial distribution. You could find the transition probability matrix  for a single swap between the states "coin 1 is in the first bag" and "coin 1 is in the second bag", and calculate its tenth power, with or without diagonalization, and use that.
A: Let's say the expected value of a coin from the first bag at step $i$ is $a_i$ and the expected value of a coin from the second bag is $b_i$ for $i=1,2,3,\dots$, so with values in cents, $a_1=100$ and $b_1=5$. Then
$$a_n=\frac{9}{10}a_{n-1} + \frac{1}{10}b_{n-1}$$
$$b_n=\frac{9}{10}b_{n-1} + \frac{1}{10}a_{n-1}$$
for $n > 1$.
Using this recursion and the initial values, we can calculate $a_n$ and $b_n$ for as large a value of $n$ as we like.
