Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A033138
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A033138 Base 2 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,0. +0
6
1, 2, 4, 9, 18, 36, 73, 146, 292, 585, 1170, 2340, 4681, 9362, 18724, 37449, 74898, 149796, 299593, 599186, 1198372, 2396745, 4793490, 9586980, 19173961, 38347922, 76695844, 153391689, 306783378, 613566756, 1227133513, 2454267026 (list; graph; listen)
OFFSET

1,2

COMMENT

Here we let p = 3 to produce the above sequence, but p can be an arbitrary natural number. By letting p = 2, 4, 6, 7 we produce A000975, A083593, A101333 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 (miyadera1272000(AT)yahoo.co.jp), Jun 04 2006

LINKS

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 926

FORMULA

a(n) = 2a(n-1) + a(n-3) - 2a(n-4) -John W. Layman (layman(AT)math.vt.edu)

G.f.: 1/((1-x^3)(1-2x)); a(n)=sum{k=0..floor(n/3), 2^(n-3k)}; a(n)=sum{k=0..n, 2^k*(cos(2*pi*(n-k)/3+pi/3)/3+sqrt(3)sin(2*pi*(n-k)/3+pi/3)/3+1/3)}; - Paul Barry (pbarry(AT)wit.ie), Apr 16 2005

MAPLE

seq(iquo(2^n, 7), n=3..34); - Zerinvary Lajos (zerinvarylajos(AT)yahoo.com), Apr 20 2008

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

CROSSREFS

Cf. A000975, A083593, A101333, A117302.

Cf. A023001, A111662.

Adjacent sequences: A033135 A033136 A033137 this_sequence A033139 A033140 A033141

Sequence in context: A101351 A111662 A119027 this_sequence A056185 A081253 A118255

KEYWORD

nonn,base

AUTHOR

Clark Kimberling (ck6(AT)evansville.edu)

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 15 20:12 EDT 2008. Contains 145099 sequences.


AT&T Labs Research