I try to show that $a_0=\lfloor \sqrt{D}\rfloor>q_{l-1}$ (or $\frac{q_{l-1}}{2}$ if $q_{l-1}$ is even) implies that there is no odd solution to the Pell equation $$x^2-Dy^2=\pm4$$
$D$ is a positive integer, $D\equiv 5 \mod 8$, $l$ is the length of the period of the continued fraction of $\sqrt{D}$, $q_{l-1}$ is the denominator of the $l^{th}$ convergent and $p_{l-1}^2-q_{l-1}^2D=\pm1$ (from which even solutions can be derived)
I tried using the standard convergents (in)equalities as well as the fundamental unit properties but got nowhere. I suspect it to be true, but I might be wrong. Anything is know about this?
OEIS references A107996 and A107999
Thanks
I think this will do the trick:
numbers $D\equiv 5 \mod 8$ that have an odd solution to $x^2-Dy^2=\pm4$ will have this propery (except for $D=5)$: $$(\frac{p_{\epsilon}+q_{\epsilon}\sqrt{D}}{2})^3=p_{l-1}+q_{l-1}\sqrt{D}$$ where $(p_{\epsilon},q_{\epsilon})$ is the smallest solution. We have then $q_{l-1}=\frac{(p_{\epsilon}^2\mp1)q_{\epsilon}}{2}$ and from the original equation: $p_{\epsilon}^2=Dq_{\epsilon}^2\pm4$, this leads to $$q_{l-1}=\frac{Dq_{\epsilon}^3\pm4q_{\epsilon}\mp q_{\epsilon}}{2}<\sqrt{D}$$ Since $D\ge13$ (we need to exclude $5$ which is a special case), this is not possible even with $q_{\epsilon}=1$
Note: Since $\lfloor \sqrt{D}\rfloor\ne q_{l-1}$, we can drop the floor function.