Below is a representation of the solutions to the equation $x^2-Dy^2=1$ for $6(6-1)\leq D \leq 6(6+1)$:
\begin{array}{c} & 30 & 31 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 & 40 & 41 & 42 \\ & \color{red}{6} & 5 & \color{red}{4} & \color{red}{3} & \color{red}{2} & \color{blue}{1} & 0 & \color{red}{1} & \color{red}{2} & \color{red}{3} & \color{red}{4} & 5 & \color{red}{6} \\ & \color{red}{2} & 273 & \color{red}{3} & \color{red}{4} & \color{red}{6} & \color{blue}{1} & - & \color{red}{12} & \color{red}{6} & \color{red}{2} & \color{red}{2} & 320 & \color{red}{2} \\ \end{array}
where the first row are the values of $D$, the second row $=|D-6^2|$, and the third row are the smallest integer solutions for $y$. With the (trivial) exception of $D=6^2-1$, the coloured numbers are clearly the divisor-pairs of $6\times 2$.
Let the coloured numbers in the third row be the trivial solutions to the Pell equation $x^2-Dy^2=1$, and define
\begin{equation} t(n)= \begin{cases} &\!\!\!\!\!1 \ \ \text{if n has a trivial solution}\\ &\!\!\!\!\!0 \ \ \text{otherwise}\\ \end{cases} \end{equation}
eg $t(n),\ 30\leq n \leq42=\{1,0,1,1,1,1,0,1,1,1,1,0,1\}$. It is fairly easy to show then, that
$$\sum_{n=1}^{x}t(n)=\sqrt{x} \left(3 \log (x)/2+6 \gamma -6+\log (2)\right)+3/2+O(x^{1/4})$$
I am sure that these elementary observations are well known, but despite many searches, I have found nothing mentioning this, so I would be most grateful if someone would point me to a relevant reference.
In addition, if there are any other (symmetric?) patterns in the solutions that I have missed, I would be very interested in exploring them, so an example, hint or reference pointing me in the right direction would be most welcome.