An easy way to understand the unit n-dimensional hypercube is to consider the region of space in n dimensions that you can get if every coordinate component lies in [0, 1]. So for one dimension it's the line segment from 0 to 1, for two dimensions it's the square with corners (0, 0) and (1, 1), etc.
Write a program or function that given n returns the average Euclidean distance of two points uniformly random selected from the unit n-dimension hypercube. Your answer must be within 10-6 of the actual value. It's ok if your answer overflows your language's native floating point type for big n.
Randomly selecting a 'big' number of points and calculating the average does not guarantee such accuracy.
Examples:
1 → 0.3333333333...
2 → 0.5214054331...
3 → 0.6617071822...
4 → 0.7776656535...
5 → 0.8785309152...
6 → 0.9689420830...
7 → 1.0515838734...
8 → 1.1281653402...
Data acquired from MathWorld.
This is code-golf, lowest byte-count wins.