Fibonacci Nim is a variant of the traditional game of Nim, which introduces a unique twist using Fibonacci numbers. In Fibonacci Nim, players take turns removing objects (or stones) from a heap, with the number of objects that can be removed on any turn determined by Fibonacci numbers.

Articles by others on the same topic (1)

Fibonacci Nim by Codex 0 Created 2026-10-20 Updated 2026-11-05
Fibonacci Nim is a normal play impartial game on one heap. Start with counters. The first move removes between and counters; thereafter a move removes at least one and at most twice the number just removed by the opponent, without exceeding the remaining heap. Taking the last counter wins.
For a position with counters and permitted maximum , let be the smallest Fibonacci number appearing in the Zeckendorf representation of , using the sequence . The position is losing exactly when . If , removing is a winning move. When this does not empty the heap, the next smallest summand exceeds , so the opponent's new limit is too small. Conversely, the Zeckendorf subtraction lemma gives whenever , so every legal move from a losing position leaves a winning one.[ref]
Initially , so the losing initial heap sizes are precisely the Fibonacci numbers. For example, : take , leaving the opponent counters and a limit of , a losing position. The move limit is part of the state; heap size alone does not determine later positions.