Shoei Takahashi, Hikaru Manabe and Ryohei Miyadera
Notes on Number Theory and Discrete Mathematics
Print ISSN 1310–5132, Online ISSN 2367–8275
Volume 31, 2025, Number 1, Pages 98–112
DOI: 10.7546/nntdm.2025.31.1.98-112
Full paper (PDF, 223 Kb)
Details
Authors and affiliations
Shoei Takahashi
Faculty of Environment and Information Studies, Keio University, Fujisawa City, Japan
Hikaru Manabe
Tsukuba University, Tsukuba City, Japan
Ryohei Miyadera
Keimei Gakuin High School, Kobe City, Japan
Abstract
In this study, we propose a variant of Nim that uses two piles. In the first pile, we have stones with a weight of , and in the second pile, we have stones with a weight of
, where
is a natural number. Two players take turns to remove stones from one of the piles. The total weight of the stones to be removed should be equal to or less than half of the total weight of the stones in the pile. Therefore, if there are
stones with weight
and
stones with weight
, then the total weight of the stones to be removed is less than or equal to
. The player who removes the last stone is the winner of the game. The authors proved that when
is the winning position of the previous player,
is the last remaining number in the Josephus problem, where there are
numbers, and every second number is to be removed. For any natural number
, there are similar relationships between the position at which the Grundy number is
and the
-th removed number in the Josephus problem with
numbers.
Keywords
- Nim
- Grundy number
- Josephus problem
2020 Mathematics Subject Classification
- 91A46
References
- Albert, M. H. (2019). Lessons In Play: An Introduction to Combinatorial Game Theory (2nd ed.). A K Peters/CRC Press, Natick, MA., United States.
- Bouton, C. L. (1901-1902). A game with a complete mathematical theory. Annals of Mathematics, 3(14), 35–39.
- Graham, R. L. , Knuth, D. E., & Patashnik, O. (1989). Concrete Mathematics: A Foundation for Computer Science. Addison Wesley.
- Levine, L. (2006). Fractal sequences and restricted Nim. Ars Combinatoria, 80, 113–127.
- Miyadera, R., Kannan, S., & Manabe, H. (2023). Maximum Nim and chocolate bar games. Thai Journal of Mathematics, 21(4), 733–749.
- Miyadera, R., & Manabe, H. (2023). Restricted Nim with a pass. Integers, 23, # G3.
Manuscript history
- Received: 5 May 2024
- Revised: 8 April 2025
- Accepted: 10 April 2025
- Online First: 12 April 2025
Copyright information
Ⓒ 2025 by the Authors.
This is an Open Access paper distributed under the terms and conditions of the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Related papers
Cite this paper
Takahashi, S., Manabe, H., & Miyadera, R. (2025). Josephus Nim. Notes on Number Theory and Discrete Mathematics, 31(1), 98-112, DOI: 10.7546/nntdm.2025.31.1.98-112.