Suppose d is a positive integer that is not a perfect square such that the negative Pell equation, x2−dy2=−1 has no solution. Then we know the minimal period of the continued fraction expansion of √d has even length, 2ℓ, and that the partial denominators, a1,…,a2ℓ−1, are symmetric about the ℓ-th partial denominator, aℓ. I.e., aℓ−j=aℓ+j for j=1,…,ℓ−1. It is this partial denominator, aℓ, that I am referring to here as the middle partial denominator.
It is a classical result that a2ℓ=2a0, but my question is what is known about the middle partial denominator, aℓ, under the above conditions on d.
Of course, if d=a20+2, where a0 is a positive integer, for example, then we know that the continued fraction expansion of √d takes the form [a0;¯a0,2a0], so the middle partial denominator is a0 here. But are there more general results known that do not depend on d satisfying such quadratic expressions that have “nice” continued fraction expansions?
Any known results with references, ideas,… would be greatly appreciated.