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
- Take Away a Perfect Square 5.0/10
- Wythoff's Losing Pairs up to Fifty 5.0/10
- Race to 100 3.0/10
Source: Classic subtraction game; no traceable original source. Statement written for AxiomIQ.