Claude Levesque, On semi-reduced quadratic forms, continued fractions and class number, quotes a theorem of Lu, H., On the class number of real quadratic fields, Scientia Sinica II (special number, 1979), 118-130, as follows:

Let $m>1$ be a squarefree integer. Then the class number of ${\bf Q}(\sqrt m)$ is one if and only if $$\theta+\sum_{i=1}^{\ell}k_i=\lambda_1(m)+\lambda_2(m)$$ where $\omega=(1+\sqrt m)/2$ if $m\equiv1\bmod4$, otherwise $\omega=\sqrt m$, the continued fraction for $\omega$ is $[k_0,\overline{k_1,\dots,k_{\ell}}]$, $\theta$ is zero, one, or two depending on $m\bmod4$ and the parity of $\ell$ and $k_{\ell/2}$, and $\lambda_1(m)$ (respectively, $\lambda_2(m)$) is the number of solutions in nonnegative integers of $x^2+4yz=\Delta$ (respectively, $x^2+4y^2=\Delta$), where $\Delta$ is $m$ if $m\equiv1\bmod4$, otherwise $4m$.

For the detailed definition of $\theta$, see the paper of Levesque. The paper goes on to prove related results.

Another paper that may be relevant is Louboutin, Mollin, & Williams, Class Numbers of Real Quadratic Fields, Continued Fractions, Reduced Ideals, Prime-Producing Quadratic Polynomials and Quadratic Residue Covers, Canadian Journal of Mathematics 44 (1992) 824-842. DOI:10.4153/CJM-1992-049-0.

2more comments