## Iterated Means

```There are several ways to define "the mean" of two positive real
numbers a,c with a>c.  The three most common "means" are

a + c
Arithmetic mean:      A(a,c) =  -------
2

Geometric mean:       G(a,c) =  sqrt(ac)

2
Harmonic mean:        H(a,c) =  -------------
(1/a) + (1/c)

In their usual thorough fashion the ancient Greeks articulated TEN
distinct "means", including the three above.  They did this by
equating various ratios that can be formed from three positive real
values a,b,c with a > b > c (where b is said to be the "mean" of a
and c).  The first six "means" can be defined by setting the ratio
(a-b)/(b-c) equal to one of the nine possible ratios between two of
the values, as shown below:

a - b
-------   =     a/a      a/b       a/c
b - c
b/a      b/b       b/c

c/a      c/b       c/c

If (a-b)/(b-c) is set to any ratio on the main diagonal, the result
is just the arithmetic mean.  If it is set to either a/b or b/c the
result is the geometric mean.  If it is set to a/c, the result is
the harmonic mean.  This leaves just the three ratios below the
diagonal.  The case c/a gives the "subcontrary to the harmonic
mean"
a^2 + c^2
K(a,c)  =  -----------
a + c

whereas the cases b/a and c/b give the peculiar "means"

_______________________
/ a-c \       |   / a-c \ 2
T(a,c)  =  (-------)  +   |  (  ---  )   +   c^2
\  2  /      \|   \  2  /

_______________________
/ c-a \       |   / c-a \ 2
C(a,c)  =  (-------)  +   |  (  ---  )   +   a^2
\  2  /      \|   \  2  /

Suppose we select two of these "means", say, A and G, and iterate
beginning with initial values a[0],c[0] as follows

a[n+1] = A(a[n],c[n])          c[n+1] = G(a[n],c[n])

The two sequences converge very rapidly on a common value, which we
can denote by AG(a,c).  This is the well known arithmetic-geometric
mean, which is extremely useful when dealing with eliptic integrals
because, as Gauss showed

/ pi/2
|           du                           pi
|      -----------------   =    -------------------
|      /----------------         2 AG(1,sqrt(1-k^2))
/ 0   \/  1 - k^2 sin^2(u)

More recently the connection between the AG mean and modular equations
has been exploited to compute millions of digits of pi.  Interestingly,
in the 1660s James Gregory showed that a different combination of means,
the geometric-harmonic mean GH, could be used to compute pi, as well as
various logarithms.  (This is described in Stillwell's "Mathematics and
Its History".)  However, in this case the indices are skewed, e.g., he
set a[0]=2 and c[0]=4 and then iterated the geometric and harmonic means
as follows

a[n+1] = G(a[n],c[n])       c[n+1] = H(a[n+1],c[n])

Notice that a[n+1] rather than a[n] is used in the expression for
c[n+1].  This iteration converges fairly rapidly on the value of pi.

Since the AG and GH iterated means are so interesting, it seems that
it might be worthwhile to investigate the other iterated means.  It
turns out that AH = G, meaning that iterating the arithmetic and
harmonic means on the initial values a,c leads (very rapidly) to
sqrt(ac).

Similarly, we find that HK = A.  It might be nice if the iterated
combination of any two of the six means was equivalent to one of the
other means, but in fact the only two such identities are AH=G and
HK=A.  (I haven't looked at the remaining four "means" that the
Greeks defined, so it's possible there is more "closure" in the
total set.)

Just to give a general idea of the hierarchy of these six means,
here's a matrix giving all 21 possible iterated means of a=5,c=1.

H         G         A         C         T         K
H    1.666666
G    1.920117  2.236068
A    2.236068  2.604008  3.000000
C    2.478335  2.817266  3.195671  3.385165
T    2.752647  3.215031  3.640492  3.834589  4.236068
K    3.000000  3.370920  3.727765  3.901347  4.285116  4.333333

(Of course, this list could be expanded by including "skewed"
iterations such as the one used by Gregory.)  We could define a
certain kind of "constructibility" based on the application of some
finite sequence of iterated means based on two given initial values.
This raises the question of which real numbers on the interval (1,5)
CANNOT be produced by a finite sequence of iterated means based on
the initial values 1,5.

For a discussion of all ten of the ancient means, see the article
The Ten Means of Ancient Greece.  Also, for a generalizations of
"iterated means", see Supersymmetric Mean.
```