Re: Help about "coin-run" problem......
- To: mathgroup at smc.vnet.net
- Subject: [mg50677] Re: Help about "coin-run" problem......
- From: astanoff_otez_ceci at yahoo.fr (astanoff)
- Date: Fri, 17 Sep 2004 01:15:41 -0400 (EDT)
- References: <ci8n0d$bud$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
George wrote: > As i'm a complete beginner at Mathematica, can someone do the > following work for me? > To show me a way the table on this page is being calculated: > http://mathworld.wolfram.com/Run.html > (It's the first and only table in the page and it is based on the > first 2 equations.) .. You can use "Series" to generate the table : den[pp_, rr_, nn_]:= (s=.; 2^n*Normal[ Series[p^r *s^r(1-p *s)/ (1-s+(1-p)p^r * s^(r+1)), {s, 0, n}/. {n -> nn}] /. {p -> pp, r -> rr, n -> nn}] /. s -> 1); Table[den[1/2, r, n], {n, 1, 8}, {r, 1, 8}] {{1,0,0,0,0,0,0,0}, {3,1,0,0,0,0,0,0}, {7,3,1,0,0,0,0,0}, {15,8,3,1,0,0,0,0}, {31, 19,8,3,1,0,0,0}, {63,43,20,8,3,1,0,0}, {127,94,47,20,8,3,1,0}, {255,201,107, 48,20,8,3,1}} hth v.a. -- 0% de pub! Que du bonheur et des vrais adhérents ! Vous aussi inscrivez-vous sans plus tarder!! Message posté à partir de http://www.gyptis.org, BBS actif depuis 1995.