# A conjectural formula for the class number of the field $\mathbb Q(\sqrt{-p})$ with $p\equiv3\pmod8$

Question. Is my following conjecture new? How to prove it?

Conjecture. Let $$p>3$$ be a prime with $$p\equiv3\pmod 8$$, and let $$h(-p)$$ denote the class number of the imaginary quadratic field $$\mathbb Q(\sqrt{-p})$$. Then we have $$h(-p)=\frac1{2\sqrt p}\sum_{k=1}^{(p-1)/2}\csc\left(2\pi\frac{k^2}p\right).$$

I have checked the conjecture numerically for all primes $$3 with $$p\equiv3\pmod8$$. Your comments are welcome!

• Via Galois theory and quadratic Gauss sums, we see that the right-hand side of the formula is a rational number. – Zhi-Wei Sun Aug 6 at 8:48
• Assuming the analytic class number formula this should be provable using just trigonometry. E.g. one could expand $1/\sin(2\pi x/p) = -2i\zeta_p^x /(1-\zeta_p^{2x}) = (2i\zeta_p^x/p) \sum_{y=1}^{p-1} y \zeta_p^{2xy}$. – François Brunault Aug 6 at 11:55

Here is a possible approach based on a formula of Zhang (see Page 432 of Wenpeng Zhang, On the mean values of Dedekind sums. J. Théor. Nombres Bordeaux 8 (1996), no. 2, 429–442.) Recalling that $$\cot\Big(\frac{\pi c}{p}\Big)=\frac{2p}{\pi\varphi(p)}\sum_{\chi(-1)=-1}\overline{\chi}(c)L(1,\chi)$$ and $$\csc(x)=\cot(x/2)-\cot(x),$$ we find \begin{align*} \sum_{1\leqslant k\leqslant p/2}\csc\Big(\frac{2\pi k^2}{p}\Big) &=\sum_{1\leqslant k\leqslant p/2}\Big\{\cot\Big(\frac{\pi k^2}{p}\Big)-\cot\Big(\frac{2\pi k^2}{p}\Big)\Big\}\\ &=\frac{2p}{\pi\varphi(p)}\sum_{\chi(-1)=-1}\{1-\overline{\chi}(2)\}L(1,\chi)\sum_{1\leqslant k\leqslant p/2}\overline{\chi}(k^2)\\ &=\frac{p}{\pi\varphi(p)}\sum_{\chi(-1)=-1}\{1-\overline{\chi}(2)\}L(1,\chi)\sum_{k\bmod p}\overline{\chi}(k^2). \end{align*} By orthogonality, the above quantity becomes \begin{align*} \frac{p}{\pi}\{1-\overline{\chi}_2(2)\}L(1,\chi_2)=\frac{2p}{\pi}L(1,\chi_2), \end{align*} where $$\chi_2$$ denotes the quadratic character mod $$p$$ and we have used the fact that $$\chi_2(2)=-1$$ for $$p\equiv3\bmod8$$. The desired identity then follows from the class number formula of Dirichlet.