The square root of any natural number $n$ can be expressed in the form of a continued fraction. When $n$ is a perfect square, its continued fraction expansion is trivial. But when it is not a perfect square, its continued fraction expansion is both infinite and periodic. We are interested in the latter here.
For more information, see:
The values presented below were computed using a Python program that I wrote in 2015.