Coin-pile Nim

A pile has 21 coins. Players alternate removing 1, 2, or 3 coins; whoever takes the last coin loses. With perfect play, should you go first or second?

Show hints (2)+
  1. Find the losing positions: counts ≡ 1 (mod 4).
  2. 21 ≡ 1 (mod 4) - so the mover loses.

Answer

Reveal answer →

Go second

Create a free account to see the full worked solution and track your progress.

Interview format: Betting Game Rounds, Prop Trading

Related questions