# “middle” partial denominator in continued fraction expansion of square roots

Suppose $$dd$$ is a positive integer that is not a perfect square such that the negative Pell equation, $$x2−dy2=−1x^{2}-dy^{2}=-1$$ has no solution. Then we know the minimal period of the continued fraction expansion of $$√d\sqrt{d}$$ has even length, $$2ℓ2\ell$$, and that the partial denominators, $$a1,…,a2ℓ−1a_{1},\ldots,a_{2\ell-1}$$, are symmetric about the $$ℓ\ell$$-th partial denominator, $$aℓa_{\ell}$$. I.e., $$aℓ−j=aℓ+ja_{\ell-j}=a_{\ell+j}$$ for $$j=1,…,ℓ−1j=1,\ldots,\ell-1$$. It is this partial denominator, $$aℓa_{\ell}$$, that I am referring to here as the middle partial denominator.

It is a classical result that $$a2ℓ=2a0a_{2\ell}=2a_{0}$$, but my question is what is known about the middle partial denominator, $$aℓa_{\ell}$$, under the above conditions on $$dd$$.

Of course, if $$d=a20+2d=a_{0}^{2}+2$$, where $$a0a_{0}$$ is a positive integer, for example, then we know that the continued fraction expansion of $$√d\sqrt{d}$$ takes the form $$[a0;¯a0,2a0][a_{0}; \overline{a_{0},2a_{0}}]$$, so the middle partial denominator is $$a0a_{0}$$ here. But are there more general results known that do not depend on $$dd$$ satisfying such quadratic expressions that have “nice” continued fraction expansions?

Any known results with references, ideas,… would be greatly appreciated.