Consider a wire of length 1 unit between two posts. Every morning birds land on it randomly with every point on the wire equally likely to host a bird. The interval from each bird to its closest neighbour is then painted.
Define to be the expected length of the wire that is painted. You are given .
Find the average of where ranges through all odd prime less than a million. Give your answer rounded to 10 places after the decimal point.