Multiply all terms in continued fraction by a constant I noticed that continued the fraction for $\sqrt{12}$ is $3;2,6,2,6,2,\ldots$
and the continued fraction for $\sqrt{7\times12}$ is $9;6,18,6,18,6,\ldots$
all the terms in the continued fraction are multiplied by $3$.  Is this just "coincidence"?  In general, what operation is scalar multiplication of the terms in a continued fraction?
 A: Note: This is not a complete answer even to the first sub-question; but it might provide some insight into the problem.

The coincidences occur if (but possibly not only if) the continued fraction for $\sqrt{m}$ is eventually periodic with period of length $2$; i.e. of the form $\langle A, \overline{B, 2A}\rangle$ for some non-negative integers $A$, $B$. The value of $m$ can then be expressed as $m=A^2+\frac{2A}{B}$.
If we replace $(A,B)$ by $(kA, kB)$ for some positive integer $k$, the value of $m$ would be transformed into $m_k = k^2A^2 + \frac{2A}{B}$. This value is divisible by $m$ if and only if $(AB+2)$ divides $2(1-k^2)$. Clearly, this happens for infinitely many $k$ for any given choice of $A$ and $B$; making the "coincidence" somewhat less rare than one could expect :-)
The original example corresponds to $A=3$ and $B=2$; with $k=1$ giving rise to $m=12$ and $k=3$ producing $m_k=84$. The condition given above tells us that taking any odd $k$ and setting $m_k=9k^2+3$ would work just as well: e.g. $k=5$ gives us $m_5=228$ whose continued fraction is $\langle 15, \overline{10, 30} \rangle$.
Whether such "coincidences" happen for any continued fractions with periods longer than $2$ is not clear... but I certainly didn't manage to find any such yet.
