login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A325594 Last remaining numbers after a symmetric variation of the Josephus problem. 1

%I #42 Jun 23 2020 01:20:37

%S 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,

%T 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,

%U 41,27,33,25,35,29,35,31

%N Last remaining numbers after a symmetric variation of the Josephus problem.

%C 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.

%H Hiroshi Matsui, Toshiyuki Yamauchi, Soh Tatsumi, Takahumi Inoue, Masakazu Naito and Ryohei Miyadera, <a href="http://www.kurims.kyoto-u.ac.jp/~kyodo/kokyuroku/contents/pdf/1652-06.pdf">Interesting Variants of the Josephus Problem</a>, Computer Algebra - Design of Algorithms, Implementations and Applications, Kokyuroku, The Research Institute of Mathematical Science, No. 1652, (2009), 44-54.

%H Masakazu Naito and Ryohei Miyadera, <a href="http://demonstrations.wolfram.com/TheJosephusProblemInBothDirections/">The Josephus Problem in Both Directions</a>, The Wolfram Demonstrations Project.

%H Masakazu Naito, Sohtaro Doro, Daisuke Minematsu and Ryohei Miyadera, <a href="http://www.mi.sanu.ac.rs/vismath/miyadera2009April/JoseVis.html"> The Self-Similarity of the Josephus Problem and its Variants</a>, Visual Mathematics, Volume 11, No. 2, 2009.

%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>

%F A165556(n) = a(n) mod 2.

%t 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]]];

%Y Cf. A006257, A165556.

%K nonn

%O 1,3

%A _Gordon Atkinson_, Sep 07 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)