TITLE: A coverage question
QUESTION [7 upvotes]: Dirichlet showed that if $q$ is a prime number and $q \equiv 3 \bmod 4$ then the sum of the nonresidues of $q$ minus the sum of the quadratic residues of $q$ in the range $1, 2, …, q − 1$ is an odd multiple of $q$.  What coverage of the odd numbers is given by these odd multiples?

REPLY [10 votes]: It is very likely that every (positive) odd number is covered by a sum of this type.
As Robin Chapman points out, this is equivalent to asking, for a given odd number $h$, whether there exists an odd prime $q\equiv3\pmod{4}$ such that $\mathbb{Q}(\sqrt{-q})$ has class number $h$.  Let $N(h)$ be the number of quadratic imaginary number fields with class number $h$ (for odd $h$) -- note that such a field is already necessarily of the form $\mathbb{Q}(\sqrt{-q})$ for $q\equiv3\pmod{4}$ by genus theory.  This rephrases your question as "Is $N(h)>0$ for all odd $h$"?
By the calculation of mark Watkins mentioned in Stoppie's answer, it is known that $N(h)>0$ for all $h\leq 100$.  More importantly, $N(h)$ gets rather large -- $N(1)=9$ is Heegner-Stark, and this is the smallest value of $N(h)$ in this range.  For instance, $N(h)>100$ for all $h>37$, and $N(99)=289$.  So we'd like an assurance of some sort of a rough upward trend to guarantee that $N(h)$ does not hit zero at some point down the road.  Enter Soundararajan's article "The number of imaginary quadratic number fields with a given class number", which studies asymptotics of $N(h)$.  Soundararajan remarks that $N(h)$ should be on the order of $h$, and conjectures more precisely that
$$
\frac{h}{\log h}\ll N(h)\ll h\log h.
$$
This is accompanied by a probabilistic argument as to why this is a reasonable conjecture.  I have not worked through the analysis, but it seems likely to me that if one's only goal was to prove that $N(h)>0$ for all $h$ (a lower bound was not a goal of the paper), this heuristic argument could be made sufficiently rigorous, especially when combined with the data for $h<100$ above, to rule out pathologies for small inputs.