

A152423


A version of the Jacobus problem. Counting people out of a circle. Who will be the survivor?


1



1, 2, 2, 4, 2, 4, 6, 8, 2, 4, 6, 8, 10, 12, 14, 16, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

a(n) is last person who remains in the circle which starts with n people. Method of counting: start at 0 and next person counts 1 and next is 0,1,0,1 and so on. While who count as 0 need to out of the circle Every people has a number and start counting at person 1 then 2,3,4.
Apparently a(n) = 2*A062050(n1), n>1.  Paul Curtz, May 30 2011


LINKS

Table of n, a(n) for n=1..74.


FORMULA

a(1)=1 a(2)=2 if n < a(n1)+2 => a(n)=2 else => a(n)=a(n1)+2.


EXAMPLE

From Omar E. Pol, Dec 16 2013: (Start)
It appears that this is also an irregular triangle with row lengths A011782 as shown below:
1;
2;
2,4;
2,4,6,8;
2,4,6,8,10,12,14,16;
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32;
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40, 42,44,46,48,50,52,54,56,58,60,62,64;
Right border gives A000079.
(End)


PROG

(Other) function F($in){ $a[1] = 1; if($in == 1){ return $a; } $temp =2; for($i=2; $i<=$in; $i++){ $temp+=2; if($temp>$i){ $temp = 2 ; } $answer[] = $temp; } return $answer; } #change $n value for the result $n=5; #sequence store in $answer by useing $a = F($n); #to display a(n) echo $a[n];


CROSSREFS

The Index to the OEIS lists 19 entries under "Jacobus problem".  N. J. A. Sloane, Dec 04 2008
Sequence in context: A063789 A106264 A278535 * A233765 A233781 A233971
Adjacent sequences: A152420 A152421 A152422 * A152424 A152425 A152426


KEYWORD

easy,nonn


AUTHOR

Suttapong Waraasawapati (retsam_krad(AT)hotmail.com), Dec 03 2008


STATUS

approved



