**Question:** Given a quadratic irrational $x = a + b\sqrt{D}$ ($a,b \in \Bbb{Q}$, $D \in \Bbb{N}\_{> 0}$ square-free) and its Galois conjugate $x' = a - b\sqrt{D}$, is it true that the continued fraction expansions of $x$ and $x'$ have the same period?


Computations of a few random example seems to suggest that is indeed the case, and I think I even saw a statement to this effect somewhere, but can't remember where.


**Motivation**: The continued fraction expansions of two numbers $x,x' \in \Bbb{R}$ conjugate via an element of $\text{PGL}\_2(\Bbb{Z})$ are 'almost the same', i.e. $a\_{k+n} = a'\_{k+m}$ for some $n,m$ and all $k \geq 0$, and I suspect that in the case of two conjugate quadratic-irrationals there always exists a 'generalized reflection' $s\_H = wsw^{-1}$, $w \in \text{PGL}\_2(\Bbb{Z})$, $s \in \left\{\begin{bmatrix} & 1 \\ 1& \end{bmatrix}, \begin{bmatrix} -1 & 1 \\ & 1\end{bmatrix}, \begin{bmatrix} -1 & \\ & 1\end{bmatrix}\right\}$ such that $s\_H(x) = x'$.



Periods of the continued fraction expansions of Galois-conjugate quadratic-irrationals
**No.** For example:


$-\frac{2}{3} + \frac{5}{7}\sqrt{6} = [1; \overline{12, 18, 1, 32, 1, 1, 2, 171, 15, 3, 1, 1, 1, 18, 2, 2, 2, 3}]$


but


$-\frac{2}{3} - \frac{5}{7}\sqrt{6} = [-3; 1, 1, \overline{2, 2, 18, 1, 1, 1, 3, 15, 171, 2, 1, 1, 32, 1, 18, 12, 3, 2}]$


As it turned out, my "random" examples all had $D = p$ a prime, and in that case the periods are (always?) palindromic!


