I have just proved that if $n$ is an integer such that $$\sqrt{n}=(a_0;\overline{a_1;2a_0})$$ then $n=a^2r^2+a$ with $a>1$ or $n=t^2a^2+2t$. I would like to prove the other way, but I have some trouble with the floor function...
2026-04-23 02:10:58.1776910258
Result on integers with continued fraction period length $=2$
49 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
I managed to prove it.
Remark 1: For $a\in\mathbb{N}\smallsetminus \{ 0,1\} ,r\in\mathbb{N}\smallsetminus \{ 0 \}$ we can prove that $\lfloor \sqrt{a^2r^2+a} \rfloor = ar$. Proof: $$ar\leq\sqrt{a^2r^2+a}<ar+1 \Longleftrightarrow a^2r^2\leq a^2r^2+a<a^2r^2+2ar+1 \Longleftarrow r\ne0$$
Now, if $n=a^2r^2+a$ with $a>1$, then $$\sqrt{n}=ar+\sqrt{n}-ar=ar+\frac{(\sqrt{n}-ar)(\sqrt{n}+ar)}{\sqrt{n}+a}=ar+\frac{1}{\frac{\sqrt{n}}{a}+r}$$
Remark 2: Let be $n=a^2r^2+a$ with $a>1$ and $r\in\mathbb{N}$, then $\left\lfloor \frac{\sqrt{n}}{a} \right\rfloor=r$. Proof: $$r\leq \frac{\sqrt{a^2r^2+a}}{a}<r+1 \Longleftrightarrow r^2\leq \frac{a^2r^2+a}{a^2}= r^2+\frac{1}{a} < r^2+2r+1 \Longleftarrow a>1$$
Let's proceed: $$\frac{\sqrt{n}}{a}+r=r+r+\frac{\sqrt{n}}{a}-r=2r+\frac{(\sqrt{n}-ar)(\sqrt{n}+ar)}{a(\sqrt{n}+ar)}=2r+\frac{1}{\sqrt{n}+ar}$$ $$\sqrt{n}+ar=ar+ar+\sqrt{n} -ar=2ar+\frac{(\sqrt{n}-ar)(\sqrt{n}+ar)}{\sqrt{n}+ar}=2ar+\frac{1}{\frac{\sqrt{n}}{a}+r}$$
Then, we have $\sqrt{n}=(ar;\overline{2r;2ar})$, QED.
Remark 3: For $a\in\mathbb{N}\smallsetminus \{ 0 \}, t\in\mathbb{N}$ we can prove that $\lfloor \sqrt{t^2a^2+2t} \rfloor=ta$. Proof: $$ta\leq\sqrt{t^2a^2+2t}< ta+1 \Longleftrightarrow t^2a^2\leq t^2a^2+2t< t^2a^2+2ta+1 \Longleftarrow a\ne 0$$
Now, if $n=t^2a^2+2t$, with $t\ne 0$, then $$\sqrt{n}=\sqrt{t^2a^2+2t}=ta+\sqrt{n}-ta=ta+\frac{(\sqrt{n}-ta)(\sqrt{n}+ta)}{\sqrt{n}+ta}=ta+\frac{1}{\frac{\sqrt{n}+ta}{2t}}$$
Remark 4: Let be $n=t^2a^2+2t$ with $a,t\in\mathbb{N}$ and $t\neq 0$, then $\left\lfloor \frac{\sqrt{n}+ta}{2t}\right\rfloor= \left\lfloor\frac{\sqrt{a^2t^2+2t}+ta}{2t}\right\rfloor=a$. Proof: $$\left\lfloor\frac{\sqrt{a^2t^2+2t}+ta}{2t}\right\rfloor=a \Longleftrightarrow a\leq \frac{\sqrt{a^2t^2+2t}+ta}{2t} < a+1 \Longleftrightarrow at\leq \sqrt{a^2t^2+2t} < at+2t \Longleftrightarrow a^2t\leq a^2t+2 < a^2t+4at+4t \Longleftarrow t>0$$
Let's proceed: $$\frac{\sqrt{n}+ta}{2t}=a +\frac{\sqrt{n}+ta}{2t}-a=a+\frac{\sqrt{n}+ta-2ta}{2t}=a+\frac{\sqrt{n}-ta}{2t}=\\ =a+\frac{(\sqrt{n}-ta)(\sqrt{n}+ta)}{2t(\sqrt{n}+ta)}=a +\frac{1}{\sqrt{n}+ta}$$ $$\sqrt{n}+ta=ta+ta+\sqrt{n}-ta=2at+\frac{(\sqrt{n}-ta)(\sqrt{n}+ta)}{\sqrt{n}+ta}=2at+ \frac{1}{\frac{\sqrt{n}+at}{2t}}$$ Then, we have $\sqrt{n}=(a_0;\overline{a_1;2a_0})$, QED.