<s>[INST] Splitting Stacks Nim A game is played with two players and an initial stack of $n$ pennies ($n\geq 3$). The players take turns choosing one of the stacks of pennies on the table and splitting it into two stacks. When a player makes a move that causes all the stacks to be of height $1$ or $2$ at the end of his or her turn, that player wins. Which starting values of $n$ are wins for each player?
For all the values I've tested, if it's even the first player wins and if it's odd the second player wins. If it's even, then the piles must be split into two evens or two odds. If it's two evens, the next player wins one of the splits recursively but the first player wins the other one (so the first player wins). If it's odd, the opposite happens (the second player recursively 'loses' both piles). If it's odd, then it must be split into one odd and one even pile, so the second player can choose to lose the odd pile and so win the even pile. BUT this doesn't take into account the fact that when you have a pile of $1$s and $2$s, that is considered finished for a pile of $n$, but when there is more than one pile, then you can still split the $2$s into $1$s and so delay your turn.
So what strategy works for all values that guarantees a win for one of the players?
 [/INST] Here for reference is a table of nim-values for every nontrivial position with less than 12 pennies.  Piles of size 1 have been omitted.
A nim-value of 0 indicates a position that is a win for the player who moves to it; any other value indicates a position that is a win for the next player to move.
$$
\begin{array}{lr}
               3 &     1 \\
\hline\\
               4 &     2 \\
\hline\\
             3,2 &     2 \\
               5 &     0 \\
\hline\\
             4,2 &     1 \\
             3,3 &     0 \\
               6 &     2 \\
\hline\\
           3,2,2 &     1 \\
             5,2 &     2 \\
             4,3 &     2 \\
               7 &     0 \\
\hline\\
           4,2,2 &     2 \\
           3,3,2 &     2 \\
             6,2 &     0 \\
             5,3 &     0 \\
             4,4 &     0 \\
               8 &     1 \\
\hline\\
         3,2,2,2 &     2 \\
           5,2,2 &     0 \\
           4,3,2 &     0 \\
             7,2 &     1 \\
           3,3,3 &     0 \\
             6,3 &     1 \\
             5,4 &     1 \\
               9 &     0 \\
\hline\\
         4,2,2,2 &     1 \\
         3,3,2,2 &     0 \\
           6,2,2 &     2 \\
           5,3,2 &     1 \\
           4,4,2 &     2 \\
             8,2 &     0 \\
           4,3,3 &     1 \\
             7,3 &     0 \\
             6,4 &     0 \\
             5,5 &     0 \\
              10 &     1 \\
\hline\\
      3,2,2,2,2 &     1 \\
         5,2,2,2 &     2 \\
         4,3,2,2 &     2 \\
           7,2,2 &     0 \\
         3,3,3,2 &     1 \\
           6,3,2 &     0 \\
           5,4,2 &     0 \\
             9,2 &     1 \\
           5,3,3 &     0 \\
           4,4,3 &     0 \\
             8,3 &     1 \\
             7,4 &     1 \\
             6,5 &     1 \\
              11 &     0 \\
\end{array}
$$
</s>