0:00
Game Theory 6.0/10

A Ladder with Steps 1, 3 and 4

A single pile holds n stones. Two players alternate; on each turn a player removes exactly 1, 3 or 4 stones (never more than remain), and the player who takes the last stone wins. For how many values of n with 1 ≤ n ≤ 1000 does the second player win with optimal play? Give an integer.

Related problems & prerequisites

Worth solving first

Source: Classic subtraction game; no traceable original source. Statement written for AxiomIQ.