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
0, 0, 0, 1, 1, 1, 2, 4, 6, 11, 20, 35, 62, 111, 197, 350, 623, 1108, 1970, 3504, 6232, 11083, 19711, 35056, 62346, 110881, 197200, 350716, 623741, 1109311, 1972887, 3508739, 6240221, 11098106, 19737755, 35103195, 62430317 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
If the sequence ends with (0,0,1,1) Abel wins.
Abel(n)=A199925(n); Winsum(n)=A199594(n).
Win probability of Kain = a(n)/2^n = 1/4.
Win probability of Abel = Abel(n)/2^n = 3/4.
Mean length of the game= n*Winsum(n)/2^n = 12.
REFERENCES
A. Engel, Wahrscheinlichkeit und Statistik, Band 2, Klett, 1978, pages 25-26.
LINKS
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^2-x^3)/(1-x-x^2-x^3+x^5).
EXAMPLE
For n=7 the a(7)=2 solutions are (0,1,0,1,1,1,1) and (1,1,0,1,1,1,1).
MAPLE
a(1):=0: a(2):=0: a(3):=0: a(4):=1: a(5):=1:
a(6):=1: a(7):=2: pot:=2^3: pk:=0:
for n from 4 to 7 do
pot:=2*pot:
pk:=pk+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):
pk:=pk+a(n)/pot:
end do:
printf("10.5f", pk):
seq(a(n), n=1..100);
CROSSREFS
Sequence in context: A026757 A026385 A254532 * A068330 A017993 A049870
KEYWORD
nonn,easy,changed
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 05:01 EDT 2024. Contains 371235 sequences. (Running on oeis4.)