amog.fun∘
fibonacci : Pile → Greed

Fibonacci Nim

One pile of coins. The first move may take anything but the whole pile. After that you may take at most twice what your opponent just took. Take the last coin to win. The bright coins are the ones you are allowed to take.

Why Amog always wins

The Fibonacci trick

Write $F_1 = 1, F_2 = 2, F_{k+1} = F_k + F_{k-1}$, so $1, 2, 3, 5, 8, 13, 21, 34, 55, 89, \dots$

\begin{theorem}[Zeckendorf, 1972]\label{thm:zeck}Every positive integer is uniquely a sum of non-consecutive Fibonacci numbers.\end{theorem}

\begin{theorem}[Whinihan, 1963]With $n$ coins left and a limit of $L$, the player to move loses if and only if the smallest part of the Zeckendorf representation of $n$ is larger than $L$. Otherwise the winning move takes exactly that smallest part.\end{theorem}

\begin{corollary}If the pile starts at a Fibonacci number, the first player loses. Try starting Amog on 55.\end{corollary}