|
| |
|
|
A119706
|
|
Numerator of expected value of the longest run of heads in n tosses of a fair coin. The denominator is 2^n.
|
|
1
| |
|
|
1, 4, 11, 27, 62, 138, 300, 643, 1363, 2866, 5988, 12448, 25770, 53168, 109381, 224481, 459742, 939872, 1918418, 3910398, 7961064, 16190194, 32893738, 66772387, 135437649, 274518868, 556061298, 1125679616
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,2
|
|
|
REFERENCES
| A. M. Odlyzko, Asymptotic Enumeration Methods, pp. 136-137
|
|
|
FORMULA
| a(n+1)=2*a(n)+A007059(n+2)
a(n)>2*a(n-1). a(n)=sum{i=1..(2^n)-1} A038374(i). - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jun 15 2006
|
|
|
EXAMPLE
| a(3)=11 because for the 8(2^3) possible runs 0 is longest run of heads once, 1 four times, 2 two times and 3 once and 0*1+1*4+2*2+3*1=11
|
|
|
MAPLE
| A038374 := proc(n) local nshft, thisr, resul; nshft := n ; resul :=0 ; thisr :=0 ; while nshft > 0 do if nshft mod 2 <> 0 then thisr := thisr+1 ; else resul := max(resul, thisr) ; thisr := 0 ; fi ; nshft := floor(nshft/2) ; od ; resul := max(resul, thisr) ; RETURN(resul) ; end : A119706 := proc(n) local count, c, rlen ; count := array(0..n) ; for c from 0 to n do count[c] := 0 ; od ; for c from 0 to 2^n-1 do rlen := A038374(c) ; count[rlen] := count[rlen]+1 ; od ; RETURN( sum('count[c]*c', 'c'=0..n) ); end: for n from 1 to 40 do print(n, A119706(n)) ; od : - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jun 15 2006
|
|
|
CROSSREFS
| Sequence in context: A192965 A035593 A160399 * A034345 A036890 A000253
Adjacent sequences: A119703 A119704 A119705 * A119707 A119708 A119709
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Adam Kertesz (adamkertesz(AT)att.net), Jun 09 2006, Jun 13 2006
|
|
|
EXTENSIONS
| More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jun 15 2006
|
| |
|
|