[go: up one dir, main page]

login
A325594
Last remaining numbers after a symmetric variation of the Josephus problem.
1
1, 1, 3, 4, 3, 6, 1, 3, 9, 1, 11, 5, 11, 7, 9, 14, 5, 12, 7, 12, 11, 14, 9, 22, 5, 20, 7, 28, 3, 30, 1, 11, 25, 9, 27, 5, 35, 7, 33, 3, 41, 1, 43, 5, 43, 7, 41, 19, 33, 17, 35, 13, 43, 15, 41, 27, 33, 25, 35, 29, 35, 31
OFFSET
1,3
COMMENTS
A variant of the Josephus problem where two numbers are eliminated at every stage, one elimination clockwise, the other counterclockwise. To resolve ambiguities, the usual Josephus problem takes precedence.
LINKS
Hiroshi Matsui, Toshiyuki Yamauchi, Soh Tatsumi, Takahumi Inoue, Masakazu Naito and Ryohei Miyadera, Interesting Variants of the Josephus Problem, Computer Algebra - Design of Algorithms, Implementations and Applications, Kokyuroku, The Research Institute of Mathematical Science, No. 1652, (2009), 44-54.
Masakazu Naito and Ryohei Miyadera, The Josephus Problem in Both Directions, The Wolfram Demonstrations Project.
Masakazu Naito, Sohtaro Doro, Daisuke Minematsu and Ryohei Miyadera, The Self-Similarity of the Josephus Problem and its Variants, Visual Mathematics, Volume 11, No. 2, 2009.
FORMULA
A165556(n) = a(n) mod 2.
MATHEMATICA
joseboth[m_, mm_] := Block[{t, p, q, u, v, w}, w = mm - 1; t = Range[m]; p = t; q = t; Do[p = RotateLeft[p, w]; u = First[p]; p = Rest[p]; q = Drop[q, Position[q, u][[1]]]; If[Length[p] == 1, Break[], ]; q = RotateRight[q, w]; v = Last[q]; q = Drop[q, -1]; p = Drop[p, Position[p, v][[1]]]; If[Length[q] == 1, Break[], ], {n, 1, Ceiling[m/2]}]; p[[1]]];
CROSSREFS
Sequence in context: A045997 A360059 A262150 * A104076 A238161 A332880
KEYWORD
nonn
AUTHOR
Gordon Atkinson, Sep 07 2019
STATUS
approved