# Snakes and Probabilistic Enigma

Assume that there are n snakes. Any 2 ends (tail or head) of the "2n" available have to be picked up and tied together and this process has to be repeated infinitely.

If p/q (gcd(p,q) = 1) is the probability of you getting a single long “snake” in the end, what would be the sum of (p+q) for all 2 <= n <= 40?

-
Did you mean "this process has to be repeated n-1 times" instead of infinitely? And do you only pick up loose ends, not already tied ends? –  comonad Jan 28 '11 at 12:56
@comonad: Usually when this problem is posed, you only pick up loose ends. You are right you stop when you run out of ends. –  Ross Millikan Jan 28 '11 at 17:19

Added: with two snakes, the chance of success is $\frac{2}{3}$ as you just have to avoid the other end of the first snake you pick up. For three, the chance of avoiding failure the first time is $\frac{4}{5}$ and of overall success is $\frac{2\cdot 4}{3\cdot 5}$. For $n$ snakes it is $\frac {2^{n-1}(n-1)!}{(2n-1)!!}$ where the two exclamation points are the double factorial-the product of all odd numbers up to $2n-1$.
So we know the rational number $p_n/q_n$ for every $n$. But the question involves the integers $p_n+q_n$, or at least their sum over every $n\le 40$... (And I did not downvote your answer.) –  Did Feb 27 '11 at 20:02