PROJECT EULER · #0560
Coprime Nim
Coprime Nim is just like ordinary normal play Nim, but the players may only remove a number of stones from a pile that is coprime with the current size of the pile. Two players remove stones in turn. The player who removes the last stone wins.
Let
For example,
You are also given
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.