## You are here

Homeinteger contraharmonic means

## Primary tabs

# integer contraharmonic means

Let $u$ and $v$ be positive integers. There exist nontrivial cases where their contraharmonic mean

$\displaystyle c\;:=\;\frac{u^{2}\!+\!v^{2}}{u\!+\!v}$ | (1) |

is an integer, too. For example, the values $u=3,\;v=15$ have the contraharmonic mean $c=13$. The only “trivial cases” are those with $u=v$, when $c=u=v$.

$u$ | $2$ | $3$ | $3$ | $4$ | $4$ | $5$ | $5$ | $6$ | $6$ | $6$ | $6$ | $7$ | $7$ | $8$ | $8$ | $8$ | $9$ | $9$ | $...$ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

$v$ | $6$ | $6$ | $15$ | $12$ | $28$ | $20$ | $45$ | $12$ | $18$ | $30$ | $66$ | $42$ | $91$ | $24$ | $56$ | $120$ | $18$ | $45$ | $...$ |

$c$ | $5$ | $5$ | $13$ | $10$ | $25$ | $17$ | $41$ | $10$ | $15$ | $26$ | $61$ | $37$ | $85$ | $20$ | $50$ | $113$ | $15$ | $39$ | $...$ |

The nontrivial integer contraharmonic means form Sloane’s sequence
A146984.

Proposition^{} 1. For any value of $u>2$, there are at least two greater values of $v$ such that
$c\in\mathbb{Z}$.

*Proof.* One has the identities

$\displaystyle\frac{u^{2}\!+\!((u\!-\!1)u)^{2}}{u+(u\!-\!1)u}\;=\;u^{2}\!-\!2u% \!+\!2,$ | (2) |

$\displaystyle\frac{u^{2}\!+\!((2u\!-\!1)u)^{2}}{u+(2u\!-\!1)u}\;=\;2u^{2}\!-\!% 2u\!+\!1,$ | (3) |

the right hand sides of which are positive integers and different for $u\neq 1$. The value $u=2$ is an exception, since it has only $v=6$ with which its contraharmonic mean is an integer.

In (2) and (3), the value of $v$ is a multiple of $u$, but it needs not be always so in order to $c$ be an integer, e.g. we have $u=12,\;v=20,\;c=17$.

Proposition 2. For all $u>1$, a necessary condition for $c\in\mathbb{Z}$ is that

$\gcd(u,\,v)>1.$ |

*Proof.* Suppose that we have positive integers $u,\,v$ such that $\gcd(u,\,v)=1$. Then as well, $\gcd(u\!+\!v,\,uv)=1$, since otherwise both $u\!+\!v$ and $uv$ would be divisible by a prime $p$, and thus also one of the factors $u$ and $v$ of $uv$ would be divisible by $p$; then however $p\mid u\!+\!v$ would imply that $p\mid u$ and $p\mid v$, whence we would have $\gcd(u,\,v)\geqq p$. Consequently, we must have $\gcd(u\!+\!v,\,uv)=1$.

We make the additional supposition that $\displaystyle\frac{u^{2}\!+\!v^{2}}{u\!+\!v}$ is an integer, i.e. that

$u^{2}\!+\!v^{2}=(u\!+\!v)^{2}\!-\!2uv$ |

is divisible by $u\!+\!v$. Therefore also $2uv$ is divisible by this sum. But because $\gcd(u\!+\!v,\,uv)=1$, the factor 2 must be divisible by $u\!+\!v$, which is at least 2. Thus $u=v=1$.

The conclusion is, that only the “most trivial case” $u=v=1$ allows that $\gcd(u,\,v)=1$. This settles the proof.

Proposition 3. If $u$ is an odd prime number, then (2) and (3) are the only possibilities enabling integer contraharmonic means.

*Proof.* Let $u$ be a positive odd prime. The values $v=(u\!-\!1)u$ and $v=(2u\!-\!1)u$ do always. As for other possible values of $v$, according to the Proposition 2, they must be multiples of the prime number $u$:

$v=nu,\quad n\in\mathbb{Z}$ |

Now

$\mathbb{Z}\ni\frac{u^{2}\!+\!v^{2}}{u\!+\!v}\;=\;\frac{(n^{2}\!+\!1)u}{n\!+\!1},$ |

and since $u$ is prime, either $u\mid n\!+\!1$ or $n\!+\!1\mid n^{2}\!+\!1$.

In the former case $n+1=ku$, one obtains

$c=\frac{(n^{2}\!+\!1)u}{n\!+\!1}\;=\;\frac{(k^{2}u^{2}\!-\!2ku\!+\!2)u}{ku}\;=% \;ku^{2}\!-\!2\!+\!\frac{2}{k},$ |

which is an integer only for $k=1$ and $k=2$, corresponding (2) and (3).

In the latter case, there must be a prime number $p$ dividing both $n\!+\!1$ and $n^{2}\!+\!1$, whence $p\nmid n$. The equation

$n^{2}\!+\!1\;=\;(n\!+\!1)^{2}\!-\!2n$ |

then implies that $p\mid 2n$. So we must have $p\mid 2$, i.e. necessarily $p=2$. Moreover, if we had $4\mid n\!+\!1$ and $4\mid n^{2}\!+\!1$, then we could write $n\!+\!1=4m$, and thus

$n^{2}\!+\!1\;=\;(4m\!-\!1)^{2}\!+\!1\;=\;16m^{2}\!-\!8m\!+\!2\not\equiv 0\;\;(% \mathop{{\rm mod}}4),$ |

which is impossible. We infer, that now $\gcd(n\!+\!1,\,n^{2}\!+\!1)=2$, and in any case

$\gcd(n\!+\!1,\,n^{2}\!+\!1)\;\leqq\;2.$ |

Nevertheless, since $n\!+\!1\geqq 3$ and $n\!+\!1\mid n^{2}\!+\!1$, we should have
$\gcd(n\!+\!1,\,n^{2}\!+\!1)\geqq 3$. The contradiction^{} means that the latter case is not possible, and the Proposition 3 has been proved.

Proposition 4. If $(u_{1},\,v,\,c)$ is a nontrivial solution of (1) with $u_{1}<c<v$, then there is always another nontrivial solution $(u_{2},\,v,\,c)$ with $u_{2}<v$. On the contrary, if $(u,\,v_{1},\,c)$ is a nontrivial solution of (1) with $u<c<v_{1}$, there exists no different solution $(u,\,v_{2},\,c)$.

For example, there are the solutions $(2,\,6,\,5)$ and $(3,\,6,\,5)$;
$(5,\,20,\,17)$ and $(12,\,20,\,17)$.

*Proof.* The Diophantine equation (1) may be written

$\displaystyle u^{2}\!-\!cu\!+\!(v^{2}\!-\!cv)\;=\;0,$ | (4) |

whence

$\displaystyle u\;=\;\frac{c\!\pm\!\sqrt{c^{2}\!+\!4cv\!-\!4v^{2}}}{2},$ | (5) |

and the discriminant^{} of (4) must be nonnogative because of the existence of the real root $u_{1}$. But if it were zero, i.e. if the equation $c^{2}\!+\!4cv\!-\!4v^{2}=0$ were true, this would imply for $v$ the irrational value
$\frac{1}{2}(1\!+\!\sqrt{2})c$. Thus the discriminant must be positive, and then also the smaller root $u$ of (4) gotten with “$-$” in front of the square root is positive, since we can rewrite it

$\frac{c\!-\!\sqrt{c^{2}\!+\!4cv\!-\!4v^{2}}}{2}\;=\;\frac{c^{2}\!-\!(c^{2}\!+% \!4cv\!-\!4v^{2})}{2(c+\sqrt{c^{2}\!+\!4cv\!-\!4v^{2}})}\;=\;\frac{2(v\!-\!c)v% }{c\!+\!\sqrt{c^{2}\!+\!4cv\!-\!4v^{2}}}$ |

and the numerator is positive because $v>c$. Thus, when the discriminant of the equation (4) is positive, the equation has always two distinct positive roots $u$. When one of the roots ($u_{1}$) is an integer, the other is an integer, too, because in the numerator of (5) the sum and the difference^{} of two integers are simultaneously even. It follows the existence of $u_{2}$, distinct from $u_{1}$.

If one solves (1) for $v$, the smaller root

$\frac{c\!-\!\sqrt{c^{2}\!+\!4cu\!-\!4u^{2}}}{2}\;=\;\frac{2(u\!-\!c)u}{c\!+\!% \sqrt{c^{2}\!+\!4cu\!-\!4u^{2}}}$ |

is negative. Thus there cannot be any $(u,\,v_{2},\,c)$.

Proposition 5. When the contraharmonic mean of two different positive integers $u$ and $v$ is an integer, their sum is never squarefree.

*Proof.* By Proposition 2 we have

$\gcd(u,\,v)\;=:\;d\;>\;1.$ |

Denote

$u\;=\;u^{{\prime}}d,\quad v\;=\;v^{{\prime}}d,$ |

when $\gcd(u^{{\prime}},\,v^{{\prime}})\,=\,1$. Then

$c\;=\;\frac{(u^{{\prime\,2}}\!+\!v^{{\prime\,2}})d}{u^{{\prime}}\!+\!v^{{% \prime}}},$ |

whence

$\displaystyle(u^{{\prime}}\!+\!v^{{\prime}})c\;=\;(u^{{\prime\,2}}\!+\!v^{{% \prime\,2}})d\;\equiv\;[(u^{{\prime}}\!+\!v^{{\prime}})^{2}\!-\!2u^{{\prime}}v% ^{{\prime}}]d.$ | (6) |

If $p$ is any odd prime factor^{} of $u^{{\prime}}\!+\!v^{{\prime}}$, the last equation implies that

$p\nmid u^{{\prime}},\quad p\nmid v^{{\prime}},\quad p\nmid[\;\;],$ |

and consequently $p\mid d$. Thus we see that

$p^{2}\mid(u^{{\prime}}\!+\!v^{{\prime}})d\;=\;u\!+\!v.$ |

This means that the sum $u\!+\!v$ is not squarefree. The same result is easily got also in the case that $u$ and $v$ both are even.

Note 1. Cf. $u\!+\!v=c\!+\!b$ in $2^{\circ}$ of
the proof of
this theorem
and the Note 4 of this entry.

Proposition 6. For each integer $u>0$ there are only a finite number of solutions $(u,\,v,\,c)$ of the Diophantine equation (1). The number does not exceed $u\!-\!1$.

*Proof.* The expression of the contraharmonic mean in (1) may be edited as follows:

$c\;=\;\frac{(u\!+\!v)^{2}-2uv}{u\!+\!v}\;=\;u\!+\!v-\frac{2u(u\!+\!v\!-\!u)}{u% \!+\!v}\;=\;v\!-\!u+\frac{2u^{2}}{u\!+\!v}$ |

In order to $c$ be an integer, the quotient

$w\;:=\;\frac{2u^{2}}{u\!+\!v}$ |

must be integer; rewriting this last equation as

$\displaystyle v\;=\;\frac{2u^{2}}{w}\!-\!u$ | (7) |

we infer that $w$ has to be a divisor of $2u^{2}$ (apparently $1\leqq w<u$ for getting values of
$v$ greater than $u$). The amount of such divisors is quite restricted, not more than $u\!-\!1$, and consequently there is only a finite number of suitable values of $v$.

Note 2. The equation (7) explains the result of Proposition 1 ($w=1$, $w=2$). As well, if $u$ is an odd prime number, then the only factors of $2u^{2}$ less than $u$ are 1 and 2, and for these the equation (7) gives the values $v:=(2u\!-\!1)u$ and $v:=(u\!-\!1)u$ which explains Proposition 3.

# References

- 1
J. Pahikkala: “On contraharmonic mean and Pythagorean triples”. –
*Elemente der Mathematik*65:2 (2010).

## Mathematics Subject Classification

11Z05*no label found*11D45

*no label found*11D09

*no label found*11A05

*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections