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

Want the full step-by-step worked solution? It's part of Premium — along with a worked solution for every question in the bank.

Asked at: SIG, DRW

Related questions