On the probability of the first player reaching m first if, starting at 0, at each round they go one step right or left each with probability 1/2 By Shalosh B. Ekhad Consider a game where players take turns tossing a fair coin and at each st\ ep either move left or right one unit and whoever reaches the location m first is declared the winner. What can you say about the probability of the first player winning the game\ ? Theorem: The probabability of the first player winning is 1/2 + 1/2 f(m) where f(m) satisfies the inhomogeneus recurrence 2 2 2 (2 m + 3 m) f(m) + (2 m + 5 m + 2) f(m + 2) + (-12 m - 24 m - 10) f(m + 1) 8 = - ---- Pi subject to the initial conditions -4 + Pi -16 + 5 Pi f(1) = - -------, f(2) = - ---------- Pi Pi and in Maple format (2*m^2+3*m)*f(m)+(2*m^2+5*m+2)*f(m+2)+(-12*m^2-24*m-10)*f(m+1) = -8/Pi subject to the initial conditions f(1) = -(-4+Pi)/Pi, f(2) = -(-16+5*Pi)/Pi Just for fun here is the sum-of-squares of the coefficient of the probabilit\ y generating function for the duration until reaching, 1000, dollars for the first time - (-894750731048126960334550414054167657495496754559952521479378919389486996\ 188198927878705222647050127632244271689222116303151848996738520313588907\ 058093986528260592422630843946157471455299439589848909686153024581224032\ 299219234759272314904792102984457906535077248129954156449458868636931019\ 336836752919389310311320437672844287231353365707839076051076388247900330\ 280087874522493139306519561203959763395876547807472262823352552748935341\ 371931133307131190608039201465392660481087213620857930580975438250432308\ 910023901386674922773938453842703986037539787689843845453496634820036208\ 652779871413775197725946139756314705826097751753971663122609302700453008\ 723440729101786585394282792772520872410635021353590695924716061934651498\ 282852733489653989925783851398697180976797247087897564826251820370148637\ 411439695876476868606232820517167582667187239228060618991402356177960417\ 926481598004145869108714908223282835891391773885353344766433712780885005\ 595227889482481772306562186281702794845073272961204414821155171429455587\ 522323426931170187919418588864846160056664001993286560923949100898476375\ 663662485623923205527522737133420228305047893926261475354868141292836596\ 707017505748059006173577024830198258944 + 284808003362792790975860939180\ 969927870152028347043838122092475984735814288365064271428408685031614561\ 814064080791317455728008540887533271112486303814831825910693790167007893\ 928767053589740859069428039349791171429952565996701330686373088319491985\ 679259859803275437231347436045002684572567586566205418573426762519194744\ 513064800010760612481427600877017148987454865210800649685229572897348679\ 677462711167397678406447909529791722090138710526718141578357411461452468\ 283770684573328484780621007242112096425616212842735132799294476924477210\ 155970476152662206590512891505757923819512480380309098594345370222851464\ 012662476080308533045943504621525784457556783558916053728488609151731706\ 386198557519533931466857154587967966231997357070134109265126996783553196\ 265526927375656512821366069314665310834824091308325215614822411266930806\ 896205235723623209871003832859408752324423810644841574963310761981285092\ 015138907143284853761675109269701928413097630520936322003218421979886586\ 788843727792216262373999791465033724849432169611531286620422018698062514\ 612062089654831065857416151236867840200568886524379879502227629807838079\ 772981720424465589080555186438465220875320645188901878190616509022274065\ 679053125 Pi)/(106693984594484749957590759035474630637397612276788389614\ 044570030446660793539144807777241258289505311777385910853317416681337764\ 422009836737695626860409648477703965265807540259441791575927747002290101\ 689004486047433234003018363597465232223312137721669492475788998276789684\ 219217668740392261231976440222751328301555544301401814506273003986039493\ 261297456873405856052770116070600603478144038208393634749025558062255637\ 84050125125 Pi) and in Maple format -1/1066939845944847499575907590354746306373976122767883896140445700304466607935\ 3914480777724125828950531177738591085331741668133776442200983673769562686040964\ 8477703965265807540259441791575927747002290101689004486047433234003018363597465\ 2322233121377216694924757889982767896842192176687403922612319764402227513283015\ 5554430140181450627300398603949326129745687340585605277011607060060347814403820\ 839363474902555806225563784050125125*(-8947507310481269603345504140541676574954\ 9675455995252147937891938948699618819892787870522264705012763224427168922211630\ 3151848996738520313588907058093986528260592422630843946157471455299439589848909\ 6861530245812240322992192347592723149047921029844579065350772481299541564494588\ 6863693101933683675291938931031132043767284428723135336570783907605107638824790\ 0330280087874522493139306519561203959763395876547807472262823352552748935341371\ 9311333071311906080392014653926604810872136208579305809754382504323089100239013\ 8667492277393845384270398603753978768984384545349663482003620865277987141377519\ 7725946139756314705826097751753971663122609302700453008723440729101786585394282\ 7927725208724106350213535906959247160619346514982828527334896539899257838513986\ 9718097679724708789756482625182037014863741143969587647686860623282051716758266\ 7187239228060618991402356177960417926481598004145869108714908223282835891391773\ 8853533447664337127808850055952278894824817723065621862817027948450732729612044\ 1482115517142945558752232342693117018791941858886484616005666400199328656092394\ 9100898476375663662485623923205527522737133420228305047893926261475354868141292\ 836596707017505748059006173577024830198258944+284808003362792790975860939180969\ 9278701520283470438381220924759847358142883650642714284086850316145618140640807\ 9131745572800854088753327111248630381483182591069379016700789392876705358974085\ 9069428039349791171429952565996701330686373088319491985679259859803275437231347\ 4360450026845725675865662054185734267625191947445130648000107606124814276008770\ 1714898745486521080064968522957289734867967746271116739767840644790952979172209\ 0138710526718141578357411461452468283770684573328484780621007242112096425616212\ 8427351327992944769244772101559704761526622065905128915057579238195124803803090\ 9859434537022285146401266247608030853304594350462152578445755678355891605372848\ 8609151731706386198557519533931466857154587967966231997357070134109265126996783\ 5531962655269273756565128213660693146653108348240913083252156148224112669308068\ 9620523572362320987100383285940875232442381064484157496331076198128509201513890\ 7143284853761675109269701928413097630520936322003218421979886586788843727792216\ 2623739997914650337248494321696115312866204220186980625146120620896548310658574\ 1615123686784020056888652437987950222762980783807977298172042446558908055518643\ 8465220875320645188901878190616509022274065679053125*Pi)/Pi