Game Theory Rulerette, Sprague-Grundy Theorem Here is the question:

Rulerette. Suppose in the game Ruler, we are not allowed to turn over
  just one coin. The rules are: Turn over any consecutive set of coins
  with at least two coins being turned over, and the rightmost coin
  going from heads to tails. Find the Sprague-Grundy function for this
  game and relate it to the Sprague-Grundy function for Ruler.

So I understand what I'm suppose to be doing but when I do the calculations I am not getting the answer the book has written out. So I want to figure out what exactly I am doing wrong.
Here is what I am doing. 
since the rule states that i need to turn over at least two coins,
g(x) = mex {g(x-1)+ g(x-2), g(x-1)+...+g(1)}
the + represents binary operation. What I'm getting stuck on is number 4 and 6.
working it out I get the following:
g(4) = mex{g(3)+g(2) = 0 +1 =1, g(3)+g(2)+g(1)= 0 + 1 + 0 = 1} so it should be 0, right?
but the table says 2. which I'm so confused about. Any help would be GREAT
 A: Ruler is described on page I-31 in these notes, from Part I of Thomas Ferguson's Game Theory course. Those notes had this useful context:

...we are given a finite number of coins in a row, each showing either heads or tails. A move consists of turning over...a set of coins...the rightmost coin turned over must go from heads to tails...
to find the Sprague-Grundy value of a position, we only need to know the Sprague-Grundy values of positions with exactly one head...
Ruler....Any number of coins may be turned over but they must be consecutive and the rightmost coin must be turned from heads to tails. If we number the positions of the coins starting with $1$ on the left, the Sprague-Grundy function for this game satisfies $$g(n)=\mathrm{mex}\{0,g(n-1),g(n-1)\oplus g(n-2),\ldots,g(n-1)\oplus\cdots\oplus g(1)\}\text{.}$$

This question about Rulerette happens to appear in homework 4 of Michael Lugo's Fall 2011 Game Theory course. Michael is also on MSE.

The important thing to understand is where that formula for Ruler comes from, and then ww can use that understanding to tackle Rulerette. For instance, in Ruler:
$g(4)=g(\mathrm{TTTH})$
$=\mathrm{mex}\{g(\mathrm{TTTT}),g(\mathrm{TTHT}),g(\mathrm{THHT}),g(\mathrm{HHHT})\}$
$=\mathrm{mex}\{g(\mathrm{}),g(\mathrm{TTH}),g(\mathrm{THH}),g(\mathrm{HHH})\}$
$=\mathrm{mex}\{g(\mathrm{}),g(\mathrm{TTH}),g(\mathrm{TTH}) \oplus g(\mathrm{TH}), g(\mathrm{TTH}) \oplus g(\mathrm{TH}) \oplus g(\mathrm{H})\}$
$=\mathrm{mex}\{0,g(3),g(3)\oplus g(2),g(3)\oplus g(2)\oplus g(1)\}$
In Rulerette, we do not have the move to $\mathrm{TTTT}$, so we don't have the first $0$ in the $\mathrm{mex}$, as the OP noted. However, when $x\ge2$, we can still flip over $2$ coins (like the move to $\mathrm{TTHT}$), so the formula for Rulerette should still have $g(x-1)$ in it. For Rulerette, we have: $g(x)=\mathrm{mex}\{g(x-1),g(x-1)\oplus g(x-2),\ldots,g(x-1)\oplus\cdots\oplus g(1)\}$.
Thus, we have $g(1)=0$ (no moves available), $g(2)=\mathrm{mex}\{g(1)\}=1$, $g(3)=\mathrm{mex}\{g(2),g(2)\oplus g(1)\}=\mathrm{mex}\{1,1\oplus0\}=\mathrm{mex}\{1,1\}=0$, and then $g(4)=\mathrm{mex}\{g(3),g(3)\oplus g(2),g(3)\oplus g(2)\oplus g(1)\}=\mathrm{mex}\{0,0\oplus1,0\oplus 1\oplus 0\}=\mathrm{mex}\{0,1,1\}=2$.
