Compute all three of the Pythagorean means of the set of integers 1 through 10 (inclusive).
Show that $A(x_1,\ldots,x_n) \geq G(x_1,\ldots,x_n) \geq H(x_1,\ldots,x_n)$ for this set of positive integers.
The most common of the three means, the arithmetic mean, is the sum of the list divided by its length: $ A(x_1, \ldots, x_n) = \frac{x_1 + \cdots + x_n}{n}$The geometric mean is the $n$th root of the product of the list: $ G(x_1, \ldots, x_n) = \sqrt[n]{x_1 \cdots x_n} $The harmonic mean is $n$ divided by the sum of the reciprocal of each item in the list: $ H(x_1, \ldots, x_n) = \frac{n}{\frac{1}{x_1} + \cdots + \frac{1}{x_n}} $Assume the input is an ordered array of all inclusive numbers.
For the answer, please output an object in the following format:
{ values: { Arithmetic: 5.5, Geometric: 4.528728688116765, Harmonic: 3.414171521474055 }, test: 'is A >= G >= H ? yes' }
pythagoreanMeans
is a function.
testString: 'assert(typeof pythagoreanMeans === "function", "pythagoreanMeans
is a function.");'
- text: 'pythagoreanMeans([1, 2, ..., 10])
should equal the same output above.'
testString: 'assert.deepEqual(pythagoreanMeans(range1), answer1, "pythagoreanMeans([1, 2, ..., 10])
should equal the same output above.");'
```