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!)
A199926 Number of sequences of n coin flips that win on the last flip, if the sequence of flips ends with (1,1,1,1). 2

%I #20 Mar 24 2024 03:23:12

%S 0,0,0,1,1,1,2,4,6,11,20,35,62,111,197,350,623,1108,1970,3504,6232,

%T 11083,19711,35056,62346,110881,197200,350716,623741,1109311,1972887,

%U 3508739,6240221,11098106,19737755,35103195,62430317

%N Number of sequences of n coin flips that win on the last flip, if the sequence of flips ends with (1,1,1,1).

%C If the sequence ends with (0,0,1,1) Abel wins.

%C Abel(n)=A199925(n); Winsum(n)=A199594(n).

%C Win probability of Kain = a(n)/2^n = 1/4.

%C Win probability of Abel = Abel(n)/2^n = 3/4.

%C Mean length of the game= n*Winsum(n)/2^n = 12.

%D A. Engel, Wahrscheinlichkeit und Statistik, Band 2, Klett, 1978, pages 25-26.

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

%F a(n) = a(n-1)+a(n-2)+a(n-3)-a(n-5) for n>7.

%F a(n) = 2*a(n-1)-a(n-4)-a(n-5)+a(n-6) for n>8.

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

%e For n=7 the a(7)=2 solutions are (0,1,0,1,1,1,1) and (1,1,0,1,1,1,1).

%p a(1):=0: a(2):=0: a(3):=0: a(4):=1: a(5):=1:

%p a(6):=1: a(7):=2: pot:=2^3: pk:=0:

%p for n from 4 to 7 do

%p pot:=2*pot:

%p pk:=pk+a(n)/pot:

%p end do:

%p for n from 8 to 100 do

%p pot:=2*pot:

%p a(n):=a(n-1)+a(n-2)+a(n-3)-a(n-5):

%p pk:=pk+a(n)/pot:

%p end do:

%p printf("10.5f",pk):

%p seq(a(n),n=1..100);

%Y Cf. A199594, A199925.

%K nonn,easy

%O 1,7

%A _Paul Weisenhorn_, Nov 12 2011

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 28 09:58 EDT 2024. Contains 372037 sequences. (Running on oeis4.)