I've updated my dice problem collection with a new problem (#29 of the now 83 problems).

The question is: how many times, on average, do we need to roll a die, multiplying the results, until we reach a perfect square? So we might roll a 1 or 4 and be immediately square. Or we might roll 2-6-5-4-3-5 to reach the square 3600.

It turns out that the expected number of rolls needed is 2^pi(s) where s is the number of sides of the die, and pi(x) is the number of primes less than or equal to x.

So, curiously, a five-sided and a six-sided die both have 8 as the expected number of rolls.

Also, it doesn't matter whether the die is fair. As long as, for example, all sides are possible (have positive probability), the expected number of rolls is the same as a fair die.

Fun stuff!

https://www.madandmoonly.com/doctormatt/mathematics/dice1.pdf

#mathematics #math #maths #dice #probability

@matthewconroy
Reading your post reminds me of the recent video by Matt Parker about calculating Pi with a coin. I've read the list of problems in your collection and couldn't find it. "What is the average ratio of number of heads to the number of flips if you flip a coin until there is more heads than tails?". Would that fit into your problem collection ?

https://youtu.be/kahGSss6SsU?si=Qta2EvJsTT2bDMVG

Calculating pi from coin flips (without randomness)

YouTube

@baillehache_pascal Thanks for the link. I'd not heard of that.

I do have one mention of Catalan numbers in my collection. It's in problem #50: can you weight a 6-sided die so that the probability of rolling 2, 3, 4, 5 and 6 is the same whether you roll once or roll twice and sum?

The "average ratio" problem reminds me of something I read a long time ago that said that averaging ratios was not a statistically valid concept. I think it might have been a Martin Gardner bit, or maybe Isaac Asimov. I'm not a statistics person, and it's valid from a purely mathematical point of view (where nonsense if perfectly okay!), so I'm not sure what the objection was. I wonder if I can find it...

Cheers!