# The game of pebbles +

The game of pebbles is a two-player game. The game starts with N stones. On a player's turn, he or she must remove either 1, a power of 2 (2,4,8,...) or a power of 3 stones (3,9,27,...). The player who does not take the last stone is the winner.

Is there a winning strategy?

• There is for some values of N and there isn't for others. Did you mean to ask "for which values of N is there a winning strategy?"? – Peter Taylor Jul 11 '17 at 6:40
• Determinate the winning position, for example – Dattier Jul 11 '17 at 6:50

The number of stones N is one more than a multiple of 5, that is, of the form $N = 5k+1$.
Note that the players always have the option to remove 1,2,3 or 4 stones. However, they can't remove 5 or a multiple of 5. So whatever move the first player makes in one of the positions of the form $5k+1$, the second player can make a move that brings the first player back to one more than a multiple of 5, until they reach 1 stone and the first player is forced to take it.