Let $x\in\{\text{totally ramified, inert, totally split}\}.$


If $p\geq 5$ is a prime, are there infinitely many imaginary quadratic fields $K=\mathbb{Q}(\sqrt{-d})$ of class number coprime to $p$ so that $p$ has ramification behaviour $x$ in $K/\mathbb{Q}$?



Existence of imaginary quadratic fields of class numbers coprime to $p$ with prescribed splitting behaviour of $p$
A more general version of this statement was shown by [Kimura](https://eudml.org/doc/278153) in Acta Arith. (2003). His corollary gives $\gg \sqrt{X}/\log X$ such fields ${\Bbb Q}(\sqrt{-d})$ with $d\le X$, and also allows you to add further
splitting conditions. There is an extensive literature on divisibility and indivisibility of class numbers and Kimura's paper has many other relevant references. 


**Update** There is also an [erratum](https://www.impan.pl/pl/wydawnictwa/czasopisma-i-serie-wydawnicze/acta-arithmetica/all/114/4/82517/correction-to-8220-a-note-on-the-existence-of-certain-infinite-families-of-imaginary-quadratic-fields-8221-acta-arith-110-2003-37-8211-43) to Kimura's paper -- it seems that he needs the existence of one such field to get a lower bound for the number of such fields; for large $p$ this is guaranteed by work of Horie. In the meantime a paper of [Wiles](http://onlinelibrary.wiley.com/doi/10.1112/jlms/jdv031/abstract) has addressed the general version of this question, and there is a quantification of Wiles's result due to [Beckwith](https://arxiv.org/pdf/1612.04443.pdf).


