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!)
A151975 The number of ways one can flip seven consecutive tails (or heads) when flipping a coin n times. 2
0, 0, 0, 0, 0, 0, 0, 1, 3, 8, 20, 48, 112, 256, 576, 1279, 2811, 6126, 13256, 28512, 61008, 129952, 275712, 582913, 1228551, 2582048, 5412984, 11321744, 23631056, 49229312, 102377216, 212560127, 440668919, 912310222, 1886316324, 3895528632, 8035861664 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,9
COMMENTS
a(n-1) is the number of compositions of n with at least one part >=8. - Joerg Arndt, Aug 06 2012
LINKS
Benjamin E. Merkel, Probabilities of Consecutive Events in Coin Flipping, OhioLINK, 2011
FORMULA
a(n) = A000079(n) - A066178(n+1).
G.f.: x^7 / ((2*x-1)*(x^7+x^6+x^5+x^4+x^3+x^2+x-1)). - Colin Barker, Oct 16 2015
EXAMPLE
a(0)=0 means that there are no cases of seven consecutive tails (or heads) in zero coin flips. Likewise, a(1)=a(2)=...=a(6)=0. a(7)=1 since there is exactly one case of seven consecutive tails in seven coin flips.
PROG
(PARI) N=66; x='x+O('x^N);
gf = (1-x)/(1-2*x); /* A011782(n): compositions of n */
gf -= 1/(1 - (x+x^2+x^3+x^4+x^5+x^6+x^7)); /* A066178(n): compositions of n into parts <=7 */
v151975=Vec(gf + 'a0); v151975[1]=0; /* kludge to get all terms */
v151975 /* show terms */
/* Joerg Arndt, Aug 06 2012 */
(PARI) concat(vector(7), Vec(x^7/((2*x-1)*(x^7+x^6+x^5+x^4+x^3+x^2+x-1)) + O(x^100))) \\ Colin Barker, Oct 16 2015
CROSSREFS
Sequence in context: A050232 A050233 A143662 * A168150 A001792 A049610
KEYWORD
nonn,easy
AUTHOR
Benjamin Merkel, Aug 05 2012
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 April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)