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!)
A327565 Number of transfers of marbles between two sets until the first repetition. 2

%I #21 Feb 22 2020 20:54:24

%S 2,3,4,3,5,4,4,5,6,4,5,6,5,5,6,5,7,6,5,7,6,5,7,6,6,7,6,6,7,6,6,7,8,6,

%T 7,8,6,7,8,6,7,8,6,7,8,6,7,8,7,7,8,7,7,8,7,7,8,7,7,8,7,7,8,7,9,8,7,9,

%U 8,7,9,8,7,9,8,7,9,8,7,9

%N Number of transfers of marbles between two sets until the first repetition.

%C There are initially n marbles in both sets. In the first turn, half of the marbles of set A are transferred to set B, rounding to the upper integer when halving. In the second turn, half of the marbles of set B are transferred back to set A, following the same rule. The game goes on back and forth until we reach a distribution already encountered.

%C a(n) is then the number of steps until the first repetition occurs.

%C First occurrence of a(n) = m > 1 in this sequence: 1, 2, 3, 5, 9, 17, 33, 65, 129, 257, 513, 1025, 2049...

%C Conjecture: for m > 2, the first occurrence of a(n) = m is for n = 2^(m-3) + 1.

%F For m > 1, first occurrence of a(n) = m is for n = A094373(m-1) (conjectured).

%e For n = 3, (SetA ; SetB):

%e (3 ; 3), ceiling(3/2)=2 marbles get transferred,

%e (1 ; 5), ceiling(5/2)=3 marbles get transferred,

%e (4 ; 2), ceiling(4/2)=2 marbles get transferred,

%e (2 ; 4), ceiling(4/2)=2 marbles get transferred,

%e (4 ; 2), this is a repetition, it took 4 steps to get there, so a(3) = 4.

%e For n = 9, (SetA ; SetB):

%e (9 ; 9), (4 ; 14), (11 ; 7), (5 ; 13), (12 ; 6), (6 ; 12), (12 ; 6) which is a repetition, so a(9) = 6.

%o (PARI) a(n)={my(v=vector(2*n+1), r=n, f=1, c=0); while(!v[1+r], v[1+r]=1; r=if(f, r-ceil(r/2), r+ceil((2*n-r)/2)); c++; f=!f); c} \\ _Andrew Howroyd_, Sep 17 2019

%Y Cf. A094373; A327613 (three sets), A327614 (four sets).

%K nonn

%O 1,1

%A _Tristan Cam_, Sep 17 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 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)