The OEIS is supported by the many generous donors to the OEIS Foundation.

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A199925 Number of sequences of n coin flips that win on the last flip, if the sequence of flips ends with (0,0,1,1). 2
 0, 0, 0, 1, 2, 4, 8, 14, 25, 45, 80, 142, 253, 450, 800, 1423, 2531, 4501, 8005, 14237, 25320, 45031, 80087, 142433, 253314, 450514, 801230, 1424971, 2534282, 4507169, 8015908, 14256129, 25354235, 45091990, 80195185, 142625502, 253656548 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,5 COMMENTS If the sequence ends with (1,1,1,1) Kain wins. Kain(n)=A199926(n). Winsum(n)=A199594(n). Win probability of Abel = sum(a(n)/2^n) = 3/4. Win probability of Kain = sum(Kain(n)/2^n)=1/4. Mean length of the game = sum(n*Winsum(n)/2^n)=12. REFERENCES A. Engel, Wahrscheinlichkeit und Statistik, Band 2, Klett, 1978, pages 25-26. LINKS Index entries for linear recurrences with constant coefficients, signature (1,1,1,0,-1). FORMULA a(n) = a(n-1)+a(n-2)+a(n-3)-a(n-5) for n>7. a(n) = 2*a(n-1)-a(n-4)-a(n-5)+a(n-6) for n>8. G.f.: x^4*(1+x)*(1+x^2)/(1-x-x^2-x^3+x^5). a(n) = A164388(n-4) for n > 3. - Georg Fischer, Oct 14 2018 EXAMPLE For n=6 the a(6)=4 solutions are (0,0,0,0,1,1),(1,0,0,0,1,1),(0,1,0,0,1,1),(1,1,0,0,1,1). MAPLE a(1):=0: a(2):=0: a(3):=0: a(4):=1: a(5):=2: a(6):=4: a(7):=8: pot:=2^3: pa:=0: for n from 4 to 7 do pot:=2*pot: pa:=pa+a(n)/pot: end do: for n from 8 to 100 do pot:=2*pot: a(n):=a(n-1)+a(n-2)+a(n-3)-a(n-5): pa:=pa+a(n)/pot: end do: printf("%10.5f", pa): seq(a(n), n=1..100); MATHEMATICA LinearRecurrence[{1, 1, 1, 0, -1}, {0, 0, 0, 1, 2, 4, 8}, 40] (* Harvey P. Dale, Jul 11 2018 *) CROSSREFS Cf. A164388, A199594, A199926. Sequence in context: A164390 A164151 A281810 * A164388 A164389 A164401 Adjacent sequences: A199922 A199923 A199924 * A199926 A199927 A199928 KEYWORD nonn AUTHOR Paul Weisenhorn, Nov 12 2011 STATUS approved

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.

Last modified December 5 01:43 EST 2022. Contains 358572 sequences. (Running on oeis4.)