Journal of Integer Sequences, Vol. 27 (2024), Article 24.3.8

Analytical Study and Efficient Evaluation of the Josephus Function


Yunier Bello-Cruz and Roy Quintero-Contreras
Department of Mathematical Sciences
Northern Illinois University
DeKalb, IL 60115
USA

Abstract:

In this paper, we present a novel approach to analyzing intrinsic properties of the Josephus function, Jk. The linear structure between extremal points of Jk is fully revealed, leading to the design of an efficient algorithm for evaluating Jk. We also derive algebraic expressions that describe how to recursively compute extremal points, including fixed points. The existence of consecutive extremal and also fixed points of Jk, for all k ≥ 2, is proven as a consequence, which generalizes Knuth’s result for k = 2. Moreover, we conduct an extensive comparative numerical experiment to illustrate the performance of the proposed algorithm for evaluating the Josephus function compared to established algorithms. The results show that the proposed scheme is highly effective in computing Jk(n) for large inputs.


Full version:  pdf,    ps,    latex    


(Concerned with sequences A000225 A182459.)


Received October 16 2023; revised versions received October 17 2023; January 21 2024; January 24 2024. Published in Journal of Integer Sequences, March 10 2024.


Return to Journal of Integer Sequences home page