The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 (list; graph; refs; listen; history; text; internal format)
 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 Cf. A006257, A165556. Sequence in context: A045997 A058024 A262150 * A104076 A238161 A332880 Adjacent sequences:  A325591 A325592 A325593 * A325595 A325596 A325597 KEYWORD nonn AUTHOR Gordon Atkinson, Sep 07 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 3 19:05 EDT 2021. Contains 346441 sequences. (Running on oeis4.)