Setup: You have $n$ coins placed in a row. Initially, all coins are heads. There is one allowable action: you can remove a coin that is not at one of the ends of a row, and flip its neighbors. The removed coin must be heads.
Example: HTHTH becomes HHHH if you remove the middle coin.
Problem: For which $n$ can you reach a state with only two coins remaining?
My attempt: Given any 5 heads in a row, we can always remove them in a manner such that we'll end up with 2 heads in a row, without removing any of the ends. Removing the 2nd coin, the 3rd coin, and then the 2nd coin:
HHHHH -> TTHH -> THT -> HH
and we can easily see inductively for $n \equiv 0, 2 \mod 3$ that there's a solution.
It seems like there isn't a solution for $n \equiv 1 \mod 3$ but I'm having a hard time showing this.