The square-root take-away game, the Josephus problem, and Silverman's square sieve
In the one-pile take-away game in which a player may remove between 1 and floor(sqrt(n)) stones from a pile of n stones, we determine the losing positions and the full Sprague–Grundy function in closed form. The losing positions with m^2 <= n < (m+1)^2 are m^2 + J(m) and, unless m = 2^j - 1, m^2 + J(m) + m + 1, where J(m) is the survivor of the Josephus problem with every second person eliminated. We show that the positive losing positions coincide with Silverman's square sieve (OEIS A002960), and we prove three conjectures recorded for that sequence in the OEIS (two formulas of G. Neri, 2015, and a conjecture of A. Ediger, 2016). We also show that the rule floor(sqrt(n/c)) corresponds to the Josephus problem with every (c+1)-st person eliminated, and we treat the rules floor(n^(1/k)). Code for the computer verification is included.
Authors
- Leonov Andrei
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-06
- DOI
- https://doi.org/10.5281/zenodo.23183138
- Primary Topic
- Advanced Combinatorial Mathematics
- Type
- preprint