# How find the value $\beta$ such $\left|\frac{p}{q}-\sqrt{2}\right|<\frac{\beta}{q^2}$

Find all positive real number $\beta$,there are infinitely many relatively prime integers $(p,q)$ such that $$\left|\dfrac{p}{q}-\sqrt{2}\right|<\dfrac{\beta}{q^2}$$

maybe this problem background is Hurwitz's theorem: $$\left|\sqrt{2}-\dfrac{p}{q}\right|<\dfrac{1}{\sqrt{5}q^2}$$

so I guess my problem ? $\beta\ge\dfrac{1}{\sqrt{5}}$

and this problem is Germany National Olympiad 2013 last problem (1), see: http://www.mathematik-olympiaden.de/aufgaben/52/4/A52124b.pdf

• The Hurwitz constant is the best global constant (i.e. valid for all numbers). There might be smaller constants for spesific numbers such as $\sqrt{2}$. One way to approach this is to write the inequality as $|p^2 - 2q^2| < \beta|p/q + \sqrt{2}|$ and study the solutions to $p^2 - 2q^2 = \pm 1$ etc. – Winther Sep 1 '14 at 3:30

Proof sketch. First write

$$\left|\frac{p}{q}-\sqrt{2}\right| = \frac{|p^2-2q^2|}{q^2\left|\frac{p}{q} + \sqrt{2}\right|}$$

The Pell equation $$p^2 - 2q^2 = 1$$

is known to have infinitely many solutions (should be proven) so

$$\left|\frac{p}{q}-\sqrt{2}\right| = \frac{|p^2-2q^2|}{q^2\left|\frac{p}{q} + \sqrt{2}\right|} = \frac{1}{q^2}\frac{1}{\left|\sqrt{2 + \frac{1}{q^2}} + \sqrt{2}\right|}$$

for infinitely many $p,q$ so all $\beta \geq \frac{1}{\sqrt{8}}$ are possible. Now try to show that it fails for $\beta < \frac{1}{\sqrt{8}}$. Let $p^2 - 2q^2 = k$ then $p/q = \sqrt{2 + k/q^2}$ and by inserting this into the inequality above show that it cannot hold for large enough $q$.

Hints:

• For all $p,q$ we have $$\left|\left(\frac pq-\sqrt2\right)\left(\frac pq+\sqrt2\right)\right|=\frac{|p^2-2q^2|}{q^2}\ge\frac1{q^2},$$ because $\sqrt2$ is irrational.
• The Pell equations $p^2-2q^2=\pm1$ have infinitely many solutions $(p_n,q_n)$. For example those determined by $$(\sqrt2-1)^n=p_n-q_n\sqrt2.$$
• When $p_n$ and $q_n$ are large, $p_n/q_n\approx\sqrt2$.
• +1. The way of proving the infinitude of solutions by looking at $(\sqrt{2}-1)^n$ is very simple and elegant. Just out of curiosity, for any non-square $k$ then $(\sqrt{k}-\lfloor \sqrt{k}\rfloor)^n = p_n - q_n \sqrt{k}$ seems to do the same trick for $p^2 - k q^2 = 1$, or is there any reason why this does not work in that case? – Winther Sep 1 '14 at 4:44
• @Winther (+1 to you was already there). That formula gives other solutions to a Pell equation when you have already found one solution. It does not work that simply always. For $k=6$ we have $\lfloor\sqrt6\rfloor=2$, and $$(\sqrt6-2)(\sqrt6+2)=6-2^2=2$$ instead of $1$. But $\sqrt6\approx 5/2$ and, indeed, $$(2\sqrt6-5)(2\sqrt6+5)=-1.$$ Therefore for all the pairs $(p_n,q_n)$ such that $p_n-q_n\sqrt6=(2\sqrt6-5)^n$ we have $$p_n^2-6q_n^2=(-1)^n.$$ – Jyrki Lahtonen Sep 1 '14 at 5:00
• @Winther, find the solution to $U^2 - k V^2 = 1$ with smallest positive $V$ and also take $U > 0.$ Then, given any $x,y,$ we get $$(U x + k V y)^2 - k (V x + U y)^2 = x^2 - k y^2$$ gives a new solution to $x^2 - k y^2 = T$ with larger numbers, for target $T$ of interest. Theorem that the totality of solutions make a finite number of orbits under this action (including inverse). – Will Jagy Sep 1 '14 at 17:12
• @WillJagy Great! Thanks to both of you. I haven't played with the Pell equation for like 10 years so its nice to relearn these things again:) – Winther Sep 1 '14 at 17:25