cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A225381 Elimination order of the first person in a Josephus problem.

This page as a plain text file.
%I A225381 #56 Dec 27 2023 10:26:22
%S A225381 1,2,2,4,3,5,4,8,5,8,6,11,7,11,8,16,9,14,10,18,11,17,12,23,13,20,14,
%T A225381 25,15,23,16,32,17,26,18,32,19,29,20,38,21,32,22,39,23,35,24,47,25,38,
%U A225381 26,46,27,41,28,53,29,44,30,53,31,47,32,64,33,50,34,60,35
%N A225381 Elimination order of the first person in a Josephus problem.
%C A225381 In a Josephus problem such as A006257, a(n) is the order in which the person originally first in line is eliminated.
%C A225381 The number of remaining survivors after the person originally first in line has been eliminated, i.e., n-a(n), gives the fractal sequence A025480.
%C A225381 For the linear version, see A225489.
%H A225381 Stefano Spezia, <a href="/A225381/b225381.txt">Table of n, a(n) for n = 1..10000</a>
%H A225381 Cristina Ballantine and Mircea Merca, <a href="https://doi.org/10.3390/sym16010005">Plane Partitions and Divisors</a>, Symmetry (2024), Vol. 16, Iss. 5. See page 9.
%H A225381 Mircea Merca, <a href="https://doi.org/10.3390/math11244996">Plane Partitions and a Problem of Josephus</a>, Mathematics (2023), Vol. 11, Iss. 4996. See page 2.
%H A225381 <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>
%F A225381 a(n) = (n+1)/2 (odd n); a(n) = a(n/2) + n/2 (even n).
%F A225381 a(n) = n - A025480(n).
%F A225381 G.f.: Sum{n>=1} x^n/(1-x^A006519(n)). - _Nicolas Nagel_, Mar 19 2018
%e A225381 If there are 7 persons to begin with, they are eliminated in the following order: 2,4,6,1,5,3,7. So the first person (the person originally first in line) is eliminated as number 4. Therefore a(7) = 4.
%t A225381 t = {1}; Do[AppendTo[t, If[OddQ[n], (n + 1)/2, t[[n/2]] + n/2]], {n, 2, 100}]; t (* _T. D. Noe_, May 17 2013 *)
%Y A225381 Cf. A006257, A006519, A025480, A225489.
%K A225381 nonn
%O A225381 1,2
%A A225381 _Marcus Hedbring_, May 17 2013