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!)
A119610 Number of cases in which the first player is killed in a Russian roulette game where 5 players use a gun with n chambers and the number of bullets can be from 1 to n. Players do not rotate the cylinder after the game starts. 2

%I #65 Jun 28 2022 12:00:31

%S 1,2,4,8,16,33,66,132,264,528,1057,2114,4228,8456,16912,33825,67650,

%T 135300,270600,541200,1082401,2164802,4329604,8659208,17318416,

%U 34636833,69273666,138547332,277094664,554189328,1108378657,2216757314

%N Number of cases in which the first player is killed in a Russian roulette game where 5 players use a gun with n chambers and the number of bullets can be from 1 to n. Players do not rotate the cylinder after the game starts.

%C Denote by U(p,n,m) the number of the cases in which the first player is killed in a Russian roulette game where p players use a gun with n chambers and m bullets. They never rotate the cylinder after the game starts. The chambers can be represented by the list {1,2,...,n}.

%C Here we let p = 5 to produce the above sequence, but p can be an arbitrary positive integer. By letting p = 2, 3, 4, 6, 7 we can produce sequences A000975, A033138, A083593, A195904 and A117302, respectively.

%C The number of cases for each of the situations identified below by (0), (1), ..., (t), where t = floor((n-m)/p), can be calculated separately:

%C (0) The first player is killed when one bullet is in the first chamber and the remaining m-1 bullets are in chambers {2,3,...,n}. There are binomial(n-1,m-1) cases for this situation.

%C (1) The first player is killed when one bullet is in the (p+1)-th chamber and the rest of the bullets are in chambers {p+2,...,n}. There are binomial(n-p-1,m-1) cases for this situation.

%C ...

%C (t) The first player is killed when one bullet is in the (p*t+1)-th chamber and the remaining bullets are in chambers {p*t+2,...,n}. There are binomial(n-p*t-1,m-1) cases for this situation.

%C Therefore U(p,n,m) = Sum_{z=0..t} binomial(n-p*z-1,m-1), where t = floor((n-m)/p). Let A(p,n) be the number of the cases in which the first player is killed when p players use a gun with n chambers and the number of bullets can be from 1 to n. Then A(p,n) = Sum_{m=1..n} U(p,n,m).

%H G. C. Greubel, <a href="/A119610/b119610.txt">Table of n, a(n) for n = 1..1000</a>

%H R. Miyadera, <a href="http://library.wolfram.com/infocenter/MathSource/5710/">General Theory of Russian Roulette</a>, Mathematica source.

%H R. Miyadera, <a href="http://www.archimedes-lab.org/fraction_patt/Magic_fruits.html">Interesting patterns of fractions</a>, Archimedes' Laboratory.

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,0,0,1,-2).

%F a(n) = floor(2^(n+4)/31), which is obtained by letting p=5 in a_p(n) = (2^(n + p-1) - 2^((n-1) mod p))/(2^p - 1).

%F From _Joerg Arndt_, Jan 08 2011: (Start)

%F G.f.: x / ( (x-1)*(2*x-1)*(x^4+x^3+x^2+x+1) ).

%F a(n) = +2*a(n-1) +a(n-5) -2*a(n-6). (End)

%e If the number of chambers is 3, then the number of the bullets can be 1, 2, or 3. The first player is killed when one bullet is in the first chamber, and the remaining bullets are in the second and third chambers. The only cases are {{1, 0, 0}, {1, 1, 0}, {1, 0, 1}, {1, 1, 1}}, where we denote by 1 a chamber that contains a bullet. Therefore a(3) = 4.

%p seq(floor(2^(n+4)/31), n = 1..32); # _Mircea Merca_, Dec 22 2010

%t U[p_,n_,m_,v_]:=Block[{t},t=Floor[(1+p-m+n-v)/p]; Sum[Binomial[n-v-p*z,m-1], {z,0,t-1}]];

%t A[p_,n_,v_]:=Sum[U[p,n,k,v],{k,1,n}];

%t (* Here we let p = 5 to produce the above sequence, but this code can produce A000975, A033138, A083593, A195904, A117302 for p = 2, 3, 4, 6, 7. *)

%t Table[B[5,n,1],{n,1,20}] (* end of program *)

%t CoefficientList[ Series[ 1/(2x^6 - x^5 - 2x + 1), {x, 0, 32}], x] (* or *)

%t LinearRecurrence[{2, 0, 0, 0, 1, -2}, {1, 2, 4, 8, 16, 33}, 32] (* _Robert G. Wilson v_, Mar 12 2015 *)

%o (Magma) I:=[1,2,4,8,16,33]; [n le 6 select I[n] else 2*Self(n-1)+Self(n-5)-2*Self(n-6): n in [1..40]]; // _Vincenzo Librandi_, Mar 18 2015

%o (PARI) for(n=1,50, print1(floor(2^(n+4)/31), ", ")) \\ _G. C. Greubel_, Oct 11 2017

%Y Cf. A000975, A033138, A083593, A195904, A117302.

%Y Partial sums of A349842.

%K easy,nonn

%O 1,2

%A _Ryohei Miyadera_, Jun 04 2006

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 23:15 EDT 2024. Contains 371798 sequences. (Running on oeis4.)