2
$\begingroup$

Let $N$ be a positive integer not being a perfect square. Define $S:=\lfloor\sqrt{N}\rfloor$

Consider the following algorithm :

We start with the pair $[A,B]:=[S,1]$

To get the next pair we define

$$C:=\frac{N-A^2}{B}$$ $$D:=\lfloor\frac{S+A}{C}\rfloor$$

Then, define $[A,B]:=[CD-A,C]$ and repeat the procedure.

How can I prove that eventually $C=1$ will occur ?

The algorithm determines the continued fraction of $\sqrt{N}$ (The calculated $D$'s are the entries).

It is well known that the continued fraction has the form $$[S,\overline{a_1,\cdots,a_k,2S}]$$ , where $a_1,\cdots a_k$ form a palindromic sequence (which can be empty).

But I do not want to use this result, in contrary , I want to prove the pattern.

The palindromic property is not so important, but it might help to prove the pattern, what I actually want is to prove that $2S$ will occur and that the period starts immediately after $S$.

Who can help ?

  • 1
    Is it the case that $C=1$ means actually that the algorithms terminates?2017-02-01
  • 0
    @Test123 If $C=1$ , we get the starting pair $[S,1]$ again, so we can stop.2017-02-01
  • 0
    The first thought that came to me was that rational numbers have a finite continued fraction expansion. I was thinking whether that result can be used for proving that $C=1$ occurs2017-02-01
  • 0
    It is not difficult to prove that only finite many pairs are possible and that $C$ is an integer in each step. But it is not obvious that the only pair repeated is $[S,1]$ (and that there is no repetition before). I do not think that the fact, that rational numbers have a finite continued fraction, helps.2017-02-01

0 Answers 0