determining integer contraharmonic means


For determining effectively values c of integer contraharmonic means of two positive integers u and v (1<u<v), it’s convenient to start from the (7) in the parent entry (http://planetmath.org/IntegerContraharmonicMeans):

v=2u2w-u (1)

where w is any positive factor of 2u2 less than u.  Substituting the above expression of v to the defining expression

c=u2+v2u+v

of c, this gets the form

c=2u2w-2u+w. (2)

Hence one can use the formulae (1) and (2), giving in them for each desired u the values w of the positive factors of 2u2, beginning from  w:=1  and stopping before  w=u.

The for the integer harmonic meanMathworldPlanetmath, corresponding (2), is simply

h= 2u-w. (3)

Example.  In the following table one sees for  u=36  all possible values of the parametre w and the corresponding values of c and h; the pertinent values of v are given, too.

w 1 2 3 4 6 8 9 12 16 18 24 27 32
v 2556 1260 828 612 396 288 252 180 126 108 72 60 45
c 2521 1226 795 580 366 260 225 156 106 90 60 51 41
h 71 70 69 68 66 64 63 60 56 54 48 45 40

As one sees, the contraharmonic and the harmonic mean may differ considerably, but also the difference 1 is possible.

References

Title determining integer contraharmonic means
Canonical name DeterminingIntegerContraharmonicMeans
Date of creation 2013-11-19 18:13:25
Last modified on 2013-11-19 18:13:25
Owner pahio (2872)
Last modified by pahio (2872)
Numerical id 15
Author pahio (2872)
Entry type Algorithm
Classification msc 11Z05
Classification msc 11A05
Classification msc 11D09
Classification msc 11D45
Related topic LinearFormulasForPythagoreanTriples