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

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

The square-root take-away game, the Josephus problem, and Silverman's square sieve

Leonov Andrei
Zenodo (CERN European Organization for Nuclear Research)
Advanced Combinatorial Mathematics
preprint

The square-root take-away game, the Josephus problem, and Silverman's square sieve

Leonov Andrei
preprint en

Abstract

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.

Zenodo (CERN European Organization for Nuclear Research)
Advanced Combinatorial Mathematics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.