In this variant of the Nim game, a pile of N stones is placed between two players. The players take alternating turns and remove some stones. The player who takes the last stone wins.
There are two restrictions however:
If both players play perfectly, then it is possible to determine which player will win the game. Note that during the game the game state can be described by the number of remaining stones and the number of stones which can be taken in the next move. Each game state is either a winning position or a losing position.
You have to determine for which values of N (2 ≤ N ≤ 2000) the second player has a winning strategy.
There is no input for this problem.
Print the values N for which the second player has a winning strategy.
Output: 2 3 5 ... 1597
Obviously, the example output is incomplete and shows only the first three values and the last value to be printed.