Every finite continued fraction is rational, since it is built from integers by finitely many additions and reciprocals. Conversely, if is rational in lowest terms, thenWhen , the next complete quotient is . Thus each step is an application of the Euclidean algorithm and replaces the denominator by a smaller nonnegative remainder. The process must terminate. This proves the termination criterion for a simple continued fraction.
For ,andFinally,so the complete quotients repeat. Hence the continued fraction of the square root of three is
Solved by gpt-5.6-sol high.
Codex Wiki