# An Inequality in Integers

### Solution 1

$a^2\lt 7b^2$ so that $a^2\le 7b^2-1.$ In $\mathbb{Z}_7,\;$ $a^2\in\{0,1,2,4\},\;$ making $a^2=7b^2-1\;$ impossible. Thus, necessarily, $a^2\le 7b^2-2.$ But then, again, $a^2= 7b^2-2\;$ is also impossible such that, in fact $a^2\le 7b^2-3,\;$ or, $a\le\sqrt{7b^2-3}.\;$

Introduce function $\displaystyle f(x)=x+\frac{1}{x}\;$ which is monotone increasing for $x\ge 1.\;$ It follows that

$\displaystyle\left(\sqrt{7b^2-3}+\frac{1}{\sqrt{7b^2-3}}\right)^2\ge\left(a+\frac{1}{a}\right)^2$

which is equivalent to

$\displaystyle 7b^2-1+\frac{1}{7b^2-3}\ge\left(a+\frac{1}{a}\right)^2.$

In addition, since $b$ is a positive integer, $\displaystyle 1\gt\frac{1}{7b^2-3},$ such that $\displaystyle 7b^2\gt\left(a+\frac{1}{a}\right)^2.\;$ In other words, $\displaystyle 7\gt\left(\frac{a}{b}+\frac{1}{ab}\right)^2,\;$ i.e., $\displaystyle\frac{a}{b}+\frac{1}{ab}\lt\sqrt{7},\;$ as required.

### Solution 2

Note that modulo $7,\,$ a square may be equal only $0,\,$ $1,\,$ $2,\,$ or $4.\,$ It follows that if $a^2\lt 7b^2\,$ then also $a^2+3\le 7b^2.$

So assume $\displaystyle\frac{a}{b}\lt\sqrt{7}.\,$ We have $a^2\lt 7b^2\,$ and, hence $a^2+3\le 7b^2.\,$ This is the same as $\displaystyle\frac{a^2}{b^2}\left(1+\frac{3}{a^2}\right)\le 7,\,$ or, $\displaystyle\frac{a}{b}\sqrt{1+\frac{3}{a^2}}\le \sqrt{7}.$

Now note that

$\displaystyle\frac{a}{b}+\frac{1}{ab}=\frac{a}{b}\left(1+\frac{1}{a^2}\right)\le\frac{a}{b}\sqrt{1+\frac{3}{a^2}}\le\sqrt{7}.$

The last step was possible because $\displaystyle\frac{1}{a^2}\lt 1\,$ and $1+x\le\sqrt{1+3x},\,$ for $0\le x\le 1.$

### Solution 3

The case of $a=1\,$ is clear, so assume $a\ge 2.$

The hypothesis can be written as $\displaystyle b\gt\frac{a}{\sqrt{7}}\,$ and the conclusion as $a^2+1\lt\ ab\sqrt{7}.$

Given $a\ge 2,\,$ the conclusion is true for some $b\gt 0,\,$ if and only if it is true for

$\displaystyle b_0=\left\lceil\frac{a}{\sqrt{7}}\right\rceil.$

From $\displaystyle b_0\gt\frac{a}{\sqrt{7}},\,$ we have $7b_0^2\gt a^2,\,$ but $7b_0^2=a^2+1\,$ and $7b_0^2=a^2+2\,$ are not possible since $a^2\,(\text{mod}\,7)\,$ is $0,1,2,\,$ $4.$

Therefore, $7b_0^2\ge a^2+3\,$ so that $ab_0\sqrt{7}\ge a\sqrt{a^2+3}\gt a^2+1,\,$ as required, since $a\ge 2.$

### Generalization

Let $p\,$ be a prime of the form $8n+7\,$ for $n\ge 1.\,$ If $a,b\gt 0\,$ are positive integers and $\displaystyle \frac{a}{b}\lt\sqrt{p}\,$ then $\displaystyle \frac{a}{b}+\frac{1}{ab}\lt\sqrt{p}.$

The proof that is essentially the same as in Solution 3 depends on the following

Lemma

If $p\,$ is a prime and $p= 7\,(\text{mod }8)\,$ then neither $-1\,$ nor $-2\,$ is a quadratic residue $\text{mod }p.$

Assume $p= 7\,(\text{mod }8),\,$

Then $-1\,$ is a quadratic residue $\text{mod }p\,$ if and only if $p=1\,\text{mod }4\,$ which would entail $3=0\,(\text{mod }4),\,$ and is, therefore, not possible.

Also, $-2\,$ is a quadratic residue $\text{mod }p\,$ if and only if $p=1,3\,\text{mod }8\,$ which would entail $3=0\,(\text{mod }4),\,$ or $1=0\,(\text{mod }2),\,$ and is, therefore, not possible.

(More on this statement can be found, e.g., in T. Nagell, Introduction to Number Theory, Chelsea Publishing Co., 1981. (Sections 38,39))

Proof of the generalization

The hypothesis can be written as $\displaystyle b\gt\frac{a}{\sqrt{p}}\,$ and the conclusion as $a^2+1\lt\ ab\sqrt{p}.$

The case of $a=1\,$ the hypothesis is $\displaystyle b\gt\frac{1}{\sqrt{p}}\,$ and the conclusion is $2\lt\ b\sqrt{p}\,$ which is true since $b\ge 1\,$ and $p\ge 7.$

Given $a\ge 2,\,$ the conclusion is true for some $b\gt 0,\,$ if and only if it is true for

$\displaystyle b_0=\left\lceil\frac{a}{\sqrt{p}}\right\rceil.$

From $\displaystyle b_0\gt\frac{a}{\sqrt{p}},\,$ we have $pb_0^2\gt a^2,\,$ but $pb_0^2=a^2+1\,$ and $pb_0^2=a^2+2\,$ are not possible since $a^2\ne -1,-2\,(\text{mod}\,p)\,$ when $p=7\,(\text{mod}\,8).$

Therefore, $pb_0^2\ge a^2+3\,$ so that $ab_0\sqrt{p}\ge a\sqrt{a^2+3}\gt a^2+1,\,$ as required, since $a\ge 2.$

### Conjecture

It was observed that for some primes in the form $8k+5,\,$ the above statement fails. For example:

$\displaystyle \begin{cases} 5:&\frac{2}{1}\lt\sqrt{5},\,\text{but}\,\frac{2}{1}+\frac{1}{2\cdot 1}\gt\sqrt{5},\\ 13:&\frac{18}{5}\lt\sqrt{13},\,\text{but}\,\frac{18}{5}+\frac{1}{18\cdot 5}\gt\sqrt{13},\\ 37:&\frac{6}{1}\lt\sqrt{37},\,\text{but}\,\frac{6}{1}+\frac{1}{6\cdot 1}\gt\sqrt{37},\\ 61:&\frac{29718}{3805} \lt \sqrt{61},\,\text{but}\,\frac{29718}{3805} + \frac{1}{29718\cdot 3805} \gt \sqrt{61}. \end{cases}$

Given prime $p=5\,(\text{mod}\,8),\,$ are there such $\displaystyle m,n\,\text{that}\,\frac{m}{n}\lt\sqrt{p},\,\text{but}\,\frac{m}{n}+\frac{1}{m\cdot n}\gt\sqrt{p}\text{?}.$

### Acknowledgment

The above inequality, due (1979) to professor Radu Gologan, has been posted at the CutTheKnotMath facebook page by Leo Giugiuc along with a solution by Dan Sitaru and Leo Giugiuc. Radu Gologan is the Romanian team leader for the IMO. Solution 2 is by Sam Walters; Solution 3 and the beautiful illustration, the generalization and conjecture are by Gary Davis.