structural:reformatting, structural:expansion
Continued fractions

In his first paper in 1828, Galois proved that the regular continued fraction which represents a quadratic surd ζ is purely periodic if and only if ζ is a reduced surd, that is, ζ > 1 {\displaystyle \zeta >1} and its conjugate η {\displaystyle \eta } satisfies − 1 < η < 0 {\displaystyle -1<\eta <0}.

In fact, Galois showed more than this. He also proved that if ζ is a reduced quadratic surd and η is its conjugate, then the continued fractions for ζ and for (−1/ η) are both purely periodic, and the repeating block in one of those continued fractions is the mirror image of the repeating block in the other. In symbols we have

where ζ is any reduced quadratic surd, and η is its conjugate.

From these two theorems of Galois a result already known to Lagrange can be deduced. If r > 1 is a rational number that is not a perfect square, then

In particular, if n is any non-square positive integer, the regular continued fraction expansion of √ n contains a repeating block of length m, in which the first m − 1 partial denominators form a palindromic string.