

A115867


Number of throws of a fair die to reach a probability of at least 0.5 (50%) to have at least one sequence of n consecutive appearances of a predefined, fixed face.


1



4, 30, 180, 1078, 6468, 38808, 232845, 1397067, 8382394, 50294353, 301766110, 1810596649, 10863579883, 65181479283, 391088875684, 2346533254087, 14079199524505, 84475197147008, 506851182882025, 3041107097292125, 18246642583752723, 109479855502516309, 656879133015097824
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS

Table of n, a(n) for n=1..23.
Newsgroup article Probabilityquestion of sci.math, Mar 6 2006.


FORMULA

For m throws, the number of outcomes without n consecutive appearances of a fixed face equals the coefficient of x^(m+1) in (1x)/(16x+5x^(n+1))/5.  Max Alekseyev, Mar 13 2009


EXAMPLE

Example a(n=1)=4: after first throw, probability of the fixed face k is 1/6, 5/6 against. After 2nd throw, probability of face k not shown before but at the 2nd throw is (5/6)*(1/6). After 3rd throw, probability of face k only at this throw is (5/6)^2*(1/6), but total probability 1/6+(5/6)*(1/6)+(5/6)^2*(1/6) still less than 0.5. After the 4th throw, total probability is 1/6+(5/6)*(1/6)+(5/6)^2*(1/6)+(5/6)^3*(1/6) > 0.5.


MAPLE

with(linalg) : # Markov state approach with probability transition matrix trans # and n+1 different states for n from 1 to 30 do trans := array(1..n+1, 1..n+1) : for co from 1 to n do trans[1, co] := 5/6 ; for ro from 2 to n +1 do trans[ro, co] := 0 ; od ; trans[co+1, co] := 1/6 : od: # initial state: a previous 4series for ro from 1 to n do trans[ro, n+1] := 0 : od : trans[n+1, n+1] := 1 : istate := vector(n+1) : istate[1] := 1 : for ro from 2 to n+1 do istate[ro] := 0 : od : #throw die with initial state vector istate for thro from 1 do istate := multiply(trans, istate) : if ( istate[n+1] > 1/2 ) then print(n, thro) ; break ; fi ; od : od:


PROG

(PARI) { a(n) = local(M, v, L); M=matrix(n+1, n+1, i, j, if(i==1&&j<=n, 5/6., if(i==j+1, 1/6., if(i==j&&i==n+1, 1., 0))) ); v=vector(n+1, j, j==1)~; L=[1, 2]; while((M^L[2]*v)[n+1]<0.5, L*=2; ); while(L[2]L[1]>1, m=(L[1]+L[2])\2; if((M^m*v)[n+1]<0.5, L[1]=m, L[2]=m); ); L[2] } /* Max Alekseyev, Mar 13 2009 */


CROSSREFS

Sequence in context: A316817 A317567 A132849 * A057416 A089154 A113450
Adjacent sequences: A115864 A115865 A115866 * A115868 A115869 A115870


KEYWORD

nonn


AUTHOR

R. J. Mathar, Mar 14 2006


EXTENSIONS

Extended by Max Alekseyev, Mar 13 2009


STATUS

approved



