%I #23 Mar 03 2023 10:59:41
%S 1,2,3,2,4,5,5,4,2,9,5,12,6,13,5,12,2,9,16,3,10,17,1,8,15,22,2,9,16,
%T 23,30,5,12,19,26,33,3,10,17,24,31,38,2,9,16,23,30,37,44,1,8,15,22,29,
%U 36,43,50,57,5,12,19,26,33,40,47,54,61,68,6,13,20,27,34,41,48,55,62,69,76
%N "Josephus problem": n persons stand in a circle and eliminate every seventh person counting clockwise until only person a(n) is remaining.
%C Several other versions of this sequence are already in the OEIS. - _N. J. A. Sloane_, Jun 24 2010
%H Leonhard Euler, <a href="https://scholarlycommons.pacific.edu/euler-works/476/">Observationes circa novum et singulare progressionum genus</a>. In: Novi Comment. Akadem. Petropol. Vol.20 (1775).
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/JosephusProblem.html">Josephus Problem</a>.
%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>.
%t Needs["Combinatorica`"]
%t a[n_] := Last@ InversePermutation@ Josephus[n, 7]; Array[a, 79] (* _Robert G. Wilson v_, Jul 31 2010 *)
%Y Cf. A005427, A006257.
%K nonn
%O 1,2
%A Roland Schroeder (florola(AT)gmx.de), Jun 18 2010
%E a(29) onwards from _Robert G. Wilson v_, Jul 31 2010