English

Maximum Nim and Josephus Problem algorithm

Combinatorics 2024-11-26 v2

Abstract

In this study, we study a Josephus problem algorithm. Let n,kn,k be positive integers and gk(n)=nk1+1g_k(n) = \left\lfloor \frac{n}{k-1} \right\rfloor +1, where    \left\lfloor \ \ \right\rfloor is a floor function. Suppose that there exists pp such that gkp1(0)<n(k1)gkp(0)g_{k}^{p-1}(0) < n(k-1) \leq g_{k}^{p}(0), where gkpg_{k}^p is the pp-th functional power of gkg_k. Then, the last number that remains is nkh2kp(0)nk-h2_{k}^{p}(0) in the Josephus problem of nn numbers, where every kk-th numbers are removed. This algorithm is based on Maximum Nim with the rule function fk(n)=nkf_k(n)=\left\lfloor \frac{n}{k} \right\rfloor. Using the present article's result, we can build a new algorithm for Josephus problem.

Cite

@article{arxiv.2404.06112,
  title  = {Maximum Nim and Josephus Problem algorithm},
  author = {Shoei Takahashi and Hikaru Manabe and Ryohei Miyadera},
  journal= {arXiv preprint arXiv:2404.06112},
  year   = {2024}
}

Comments

arXiv admin note: substantial text overlap with arXiv:2403.19308

R2 v1 2026-06-28T15:48:28.643Z