The Game of Subtracting PrimesComputer Science Level 4
- The game starts with a parameter N which is a positive integer.
- Ivan always plays first.
- In each turn, the player can either choose to add or subtract the largest prime smaller than N, to N.
- The loser is the person who cannot continue. The other person wins by default.
1 2 3 4 5 6
Now, suppose that Ivan and Jake know how to play optimally. For how many starting values of \(N < 10^4\) does Jake win?