%I #23 Jun 23 2020 19:05:43
%S 1,1,3,3,1,3,4,4,3,1,9,5,13,7,15,7,15,5,13,1,9,17,2,10,18,26,7,15,23,
%T 1,9,17,25,33,6,14,22,30,38,6,14,22,30,38,1,9,17,25,33,41,49,5,13,21,
%U 29,37,45,53,2,10,18,26,34,42,50,58,66,6,14,22,30,38,46,54,62,70,1,9,17,25
%N The winning position when playing the "eeny meeny miny moe" game with n players and eliminating every 8th player.
%C A version of the Josephus sieve - see for example A000960. - _N. J. A. Sloane_, May 26 2007
%C In this game, all the children start standing in front of a chair and the teacher will chant "eeny-meeny-miny-moe..." and eliminate every eighth player, who then has to sit down. The game continues until only one child remains standing. He or she is declared the winner.
%C The multiples of 8 never appear in this sequence because they are always wiped out in the first round.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Eeny,_meeny,_miny,_moe">Eeny, meeny, miny, moe</a>
%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>
%F For n > 5, if a(n-1) + 8 > n, then a(n) = a(n-1) + 8 - n; otherwise, a(n) = a(n-1) + 8.
%e For n = 4 the winner is the third child because:
%e 1, 2, 3, 4, 1, 2, 3, X (the fourth is eliminated)
%e 1, 2, 3, 1, 2, 3, 1, X (the second is eliminated)
%e 3, 1, 3, 1, 3, 1, 3, X (the first is eliminated, therefore #3 wins); thus a(4)=3.
%K nonn,easy
%O 1,3
%A _Sergio Pimentel_, Aug 02 2005
%E Edited by _Charles R Greathouse IV_, Nov 11 2009