Continued Fractions for Square Roots

It is a well known fact that the digits that make up the decimal expansion of the square root of a non – square number have no pattern, but the continued fraction does return a patter. We can obtain the continued fraction for the square root of a general numberby considering

Continuing in this way we eventually get a repeating cycle, and by choosing suitable values of n and k the continued fraction for any square root of an integer can be found. The continued fraction for square roots of non square integers up to 30 are given in the following table.

Notice that each continued fraction is of the form