PROJECT EULER · #0329
Prime Frog
Susan has a prime frog.
Her frog is jumping around over
(if it lands at either end, it automatically jumps to the only available square on the next move.)
When he is on a square with a prime number on it, he croaks 'P' (PRIME) with probability
When he is on a square with a number on it that is not a prime he croaks 'P' with probability
Given that the frog's starting position is random with the same probability for every square, and given that she listens to his first
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.