> If a coin is flipped until there has been at least > one head and at least one tail and gcd(number of > heads,number of tails) >1, what is the expected > number of flips? > > I simulated 1000000 games because I couldn't be > bothered to think and got a mean of 6.00584, and if > the answer is 6 there ought to be some elegant proof > that is eluding me.
Hi Angela, I'm not sure I fully understand the question, but it seems you need at least 4 flips. After 4 flips you should have achieved the desired result in 1/4 cases, on average. Presumably successful sequences will be discontinued. For those sequences not achieving the desired result, a further 2 flips will achieve the desired result in 6/12 cases, on average. Again continuing the still unsuccessful sequences, a further 2 flips will achieve the desired result in 11/24 cases, on average. You could continue this sequence. It may or may not verify your conjecture. I hope this helps. Regards, Peter Scales.