login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A083593 Expansion of 1/((1-2*x)*(1-x^4)). 4
1, 2, 4, 8, 17, 34, 68, 136, 273, 546, 1092, 2184, 4369, 8738, 17476, 34952, 69905, 139810, 279620, 559240, 1118481, 2236962, 4473924, 8947848, 17895697, 35791394, 71582788, 143165576, 286331153, 572662306, 1145324612, 2290649224 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Here we let p =4 to produce the above sequence, but p can be an arbitrary natural number. By letting p = 2, 3, 6, 7 we produce A000975, A033138, A195904 and A117302. We denote by U[p,n,m] the number of the cases that the first player gets 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}.

We are going to calculate the following (0), (1),...(t) separately. (0) The first player gets 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 gets 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 gets killed when one bullet is in (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[binomial[n-pz-1,m-1], for z = 0 to t, where t = Floor[(n-m)/p]. Let A[p,n] be the number of the cases that the first player gets killed when p-player use a gun with n-chambers and the number of the bullets can be from 1 to n. Then A[p,n] = Sum[U[p,n,m], m = 1 to n]. - Ryohei Miyadera, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

FORMULA

a(n) = 2*a(n-1) +a(n-4) -2*a(n-5).

a(n) = -1/4+[1/20-(1/10)*I]*I^n+(1/12)*(-1)^n+(16/15)*2^n+[1/20+(1/10)*I]*(-I)^n, with n>=0 and I=sqrt(-1). - Paolo P. Lava, Jun 10 2008

If n is a multiple of 4, then a(n) = 2*a(n-1) + 1, otherwise a(n) = 2*a(n-1). - Gerald McGarvey, Oct 14 2008

a(n) = floor((2^(n+5)+1)/30). - Tani Akinari, Jul 09 2013

a(n) = 2*a(n-1) + floor(((n-1) mod 4) /3), with a(0)=1. - Andres Cicuttin, Mar 29 2016

a(n) = 2*a(n-1) + 1 - ceiling[(n mod 4)/4], with a(0)=1. - Andres Cicuttin, Mar 29 2016

MATHEMATICA

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 = 4 to produce the above sequence, but this code can produce A000975, A033138, A195904, A117302 for p=2, 3, 6, 7.*) Table[A[4, n, 1], {n, 1, 20}] (* Ryohei Miyadera, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006 *)

CoefficientList[Series[1/((1-2x)(1-x^4)), {x, 0, 40}], x] (* Vincenzo Librandi, Apr 04 2012 *)

a[n_] := FromDigits[Table[(Mod[j, 4]/4) // Round, {j, 1, n + 3}], 2] (* Andres Cicuttin, Mar 25 2016 *)

a[n_] := a[n] = 2 a[n - 1] + 1 - Ceiling[Mod[n, 4]/4]; a[0] = 1;

Table[a[n], {n, 0, 31}] (* Andres Cicuttin, Mar 27 2016 *)

PROG

(PARI) Vec(1/((1-2*x)*(1-x^4))+O(x^99)) \\ Charles R Greathouse IV, May 15 2013

(PARI) a(n)=(16<<n)\15 \\ Charles R Greathouse IV, Mar 27 2016

CROSSREFS

Cf. A033138, A000975, A033138, A195904, A117302.

Sequence in context: A056184 A098718 A018299 * A267045 A266446 A018093

Adjacent sequences:  A083590 A083591 A083592 * A083594 A083595 A083596

KEYWORD

easy,nonn

AUTHOR

Paul Barry, May 02 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified October 22 02:06 EDT 2017. Contains 293756 sequences.