6. [20] Andrew has a fair six sided die labeled with 1 through 6 as usual. He tosses it repeatedly, and on every third roll writes down the number facing up as long as it is not the 6 . He stops as soon as the last two numbers he has written down are squares or one is a prime and the other is a square. What is the probability that he stops after writing squares consecutively?
Answer: $4 / \mathbf{2 5}$. We can safely ignore all of the rolls he doesn't record. The probability that he stops after writing two squares consecutively is the same as the probability that he never rolls a prime. For, as soon as the first prime is written, either it must have been preceded by a square or it will be followed by a nonnegative number of additional primes and then a square. So we want the probability that two numbers chosen uniformly with replacement from $\{1,2,3,4,5\}$ are both squares, which is $(2 / 5)^{2}$.