1
$\begingroup$

Here :

Smallest number $N$, such that $\sqrt{N}-\lfloor\sqrt{N}\rfloor$ has a given continued fraction sequence

I asked for the smallest number $N$, such that $frac(\sqrt{N})$ has a continued fraction beginning with a given sequence.

This problem can efficiently be solved, if the following problem can be efficiently solved :

Given rational numers $s,t$ with $0

The inequality surely holds, if $(k+t)^2-(k+s)^2>1$, this is equivalent to $k>\frac{1+s^2-t^2}{2(t-s)}$. Hence, the existence of a $k$ is clear and $\lceil \frac{1+s^2-t^2}{2(t-s)}\rceil +1$ is an upper bound, but usually much too large.

Is there a formula for $k$, or do I have to determine $k$ by brute force ?

0 Answers 0