  A formula for the sum of quadratic residues modulus a prime $p=4n-1$ is
studied. We relate some terms on this formula with roots of quadratics and
provide an exhaustive analysis of new concepts based on these roots. A number
of formulas for the sum of the quadratic residues are obtained. We finalize the
paper by obtaining several identities involving $h(-p)$ the class number of the
imaginary quadratic field $\mathbb Q(\sqrt{-p}).$
