Square roots of integers

A square root of an integer is either integer or irrational. We can explore this fact by calculating the approximation in increasingly long continued fractions of this square root. And this sequence of integer coefficients is periodic! We can observe this fact graphically, then we can demonstrate it. It which proves that such a number is not rational because all the rational numbers have a finite continuous fraction.
You can modify the integer with the slider.