Consider odd n. (I'll let someone else do even n).
There are n-3 diagonals emanating from each point. Call these n-3 diagonals a "set".
The lengths in each set come in pairs. E.g., a set of diagonals of a pentagon is one pair of equal length, while a set for a heptagon is two pairs of equal length.
We only need to compute the mean of the unique lengths in each set due to symmetry (every unique length appears n times in the figure. There are (n-3)/2 unique lengths.
Each diagonal is the base of an isosceles triangle where the third point is the figure's center and the sides are circumradii of length n pi.
The angle from the center is, for n=5, (2/5) [2 pi]. Going to n=7, 9, ...
the center angles are (2/7, 3/7) [2 pi], (2/9, 3/9, 4/9) [2 pi], ...
What length diagonals do these triangles yield? Drop an angle bisector from the center. Half the length becomes the base of a right triangle.
For the pentagon, where we divide the angle theta = (2/5) [2 pi] by two, the length l is:
l = 2 hypotenuse sin(theta/2)
l = 2 n pi sin (2 pi /5)
So, in general,
Mn = [1/(num of lengths)] (sum {i= 1--> num of lengths} length_i)
= 2/(n-3) (2 n pi) (sum {i= 1 --> (n-3)/2} sin( [1+i] pi/n ))
and, then, ah, ....
Edited on November 23, 2018, 6:28 pm