Reference for relation between class number of $\Bbb Q[\sqrt{-p}]$ and partial quotients of $\sqrt p$ So in Ireland and Rosen's, "Classical Introduction to Modern Number Theory", they mention the following incredible fact at the end of Chapter 13, section 1. Suppose $p \neq 3$ and $p \equiv 3 \pmod 4$ and $\mathbb Q[\sqrt{p}]$ has class number one. Let $\sqrt{p}=[a_{0}, \overline{a_1 ,\ldots a_{n}}]$ be its continued fraction expansion. Then $\frac{1}{3}(a_n - a_{n-1} + \ldots \pm a_1)$ is the class number of $\mathbb Q[\sqrt{-p}]$. The fact is attributed to Hirzebruch, and I have no clue how it is proven, and am unable to find a proof. Talking to a professor and a little research revealed that this has something to do with the Hilbert modular surface. I would appreciate some help in understanding this incredible fact!
 A: Very interesting indeed!
This is explained in

Hirzebruch, F., 
   Hilbert modular surfaces and class numbers. 
  Colloque “Analyse et Topologie” en l’Honneur de Henri Cartan (Orsay, 1974), pp. 151–164.
  Asterisque, No. 32-33, Soc. Math.France, Paris, 1976.

From the Math.Sci.Net review: 

This is a survey, largely without proofs, of recent work of the author, done partly in collaboration
  with D. B. Zagier, on the geometry of the Hilbert modular surface(s) associated to a real quadratic
  ﬁeld, concentrating particularly on the appearance therein of class numbers.

... and later in the review ...

He then introduces the Hilbert modular surfaces: the compactiﬁed and resolved quotients of the
  actions of congruence subgroups of SL2 over the integers of the real quadratic ﬁeld, acting on H ×
  H. He sketches the results [op. cit.] about the signature of the quotient and how, as a consequence
  of all of the foregoing considerations, one is able to express, for a prime p of form 4m − 1, p > 3,
  the class number of the quadratic ﬁeld of discriminant −p in terms of the period of the continued
  fraction for $p^{1/2}$ whenever the class number of the quadratic ﬁeld of discriminant 4p is one.

A: I've finally found a reference! Thank you to Jared Weinstein for supplying the reference and Jeremy Booher for the excellent exposition. 
http://math.stanford.edu/~jbooher/expos/hilbert_modular_surfaces.pdf
