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!)
A195904 Base-2 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,0,0,0,0. 5

%I #25 Apr 14 2021 05:28:12

%S 1,2,4,8,16,32,65,130,260,520,1040,2080,4161,8322,16644,33288,66576,

%T 133152,266305,532610,1065220,2130440,4260880,8521760,17043521,

%U 34087042,68174084,136348168,272696336,545392672,1090785345,2181570690,4363141380,8726282760

%N Base-2 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,0,0,0,0.

%C Here we let p = 6 to produce the above sequence, but p can be an arbitrary natural number. By letting p = 2, 3, 4, 7 we produce A000975, A033138, A083593 and A117302. We denote by U(p,n,m) the number of cases in which the first player is killed in a Russian roulette game when 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 We are going to calculate the following (0), (1), ..., (t) separately. (0) The first player is killed when one bullet is in the first chamber and the remaining (m-1) bullets are in {2,3,...,n}. We have binomial(n-1,m-1) cases for this. (1) The first is killed when one bullet is in the (p+1)th chamber and the rest of the bullets are in {p+2,..,n}. We have binomial(n-p-1,m-1) cases for this. We continue to calculate and the last is (t), where t = floor((n-m)/p). (t) The first is killed when one bullet is in the (pt+1)-th chamber and the remaining bullets are in {pt+2,...,n}. We have binomial(n-pt-1,m-1) cases for this. Therefore U(p,n,m) = Sum_{z=0..floor((n-m)/p)} binomial(n-pz-1,m-1). Let A(p,n) be the number of cases in which the first player is killed when p players use a gun with n chambers and the number of the bullets can be from 1 to n. Then A(p,n) = Sum_{m=1..n} U(p,n,m). - _Ryohei Miyadera_, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006

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

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

%F From _Colin Barker_, Jun 09 2013: (Start)

%F a(n) = floor(2^(n+5)/63).

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

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

%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}]]; A[p_, n_, v_]:=Sum[U[p, n, k, v], {k, 1, n}]; (* Here we let p = 6 to produce the above sequence, but this code can produce A000975, A033138, A083593, A117302 for p = 2, 3, 4, 7. *) Table[A[6, n, 1], {n, 1, 20}] (* _Ryohei Miyadera_, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006 *)

%t Rest[CoefficientList[Series[x/(2*x^7 - x^6 - 2*x + 1), {x, 0, 50}], x]] (* _G. C. Greubel_, Sep 28 2017 *)

%o (PARI) x='x+O('x^50); Vec(x/(2*x^7 - x^6 - 2*x + 1)) \\ _G. C. Greubel_, Sep 28 2017

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

%K nonn,base,easy

%O 1,2

%A _Jeremy Gardiner_, Sep 25 2011

%E More terms from _Colin Barker_, Jun 09 2013

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 May 9 13:34 EDT 2024. Contains 372351 sequences. (Running on oeis4.)