## Return to Answer

3 added reference

Accoring to H. Lenstra, Chebotarev's theorem holds both for Dirichlet and for natural density (but he doesn't give a reference in this document). Applying Chebotarev to the extension $H/\mathbb{Q}$ where $H$ is the Hilbert class field of $\mathbb{Q}(\sqrt{-n})$ gives the result you want. (At least for primitive discriminants; for non-primitive discriminants you need an appropriate generalization of the Hilbert class field).

Added in response to Will's comment There is always a suitable field. Let $-D$ be a primitive negative discriminant and let $d=-m^2D$ be a general discriminant. Let $H_n$ be the abelian extension of $K=\mathbb{Q}{\sqrt{-D}}$ where a non-ramified prime splits iff its is principal and generated by an element of $\mathbb{Z}+m\mathcal{O}_K$. Such a field $H_n$ is called a ring class field and exists by class field theory. It also is an extension of $K$ by a singular value of the $j$-function.

Then $G_m=\mathrm{Gal}(H_n/\mathbb{Q})$ is a generalized dihedral group. There is a correspondence between conjugacy classes in $G_m$ and pairs of equivalence classes of $ax^2\pm bxy+cy^2$ of discriminant $d$, such that an unramified prime has its Frobenius in a conjugacy class iff it it represented by the corresponding form. This is why we can apply Chebotarev.

Even more added A good reference for ring class fields is Cox's book Primes of the Form $x^2+ny^2$.

2 added additional content

Accoring to H. Lenstra, Chebotarev's theorem holds both for Dirichlet and for natural density (but he doesn't give a reference in this document). Applying Chebotarev to the extension $H/\mathbb{Q}$ where $H$ is the Hilbert class field of $\mathbb{Q}(\sqrt{-n})$ gives the result you want. (At least for primitive discriminants; for non-primitive discriminants youe you need an appropriate generalization of the Hilbert class field).

Added in response to Will's comment There is always a suitable field. Let $-D$ be a primitive negative discriminant and let $d=-m^2D$ be a general discriminant. Let $H_n$ be the abelian extension of $K=\mathbb{Q}{\sqrt{-D}}$ where a non-ramified prime splits iff its is principal and generated by an element of $\mathbb{Z}+m\mathcal{O}_K$. Such a field $H_n$ is called a ring class field and exists by class field theory. It also is an extension of $K$ by a singular value of the $j$-function.

Then $G_m=\mathrm{Gal}(H_n/\mathbb{Q})$ is a generalized dihedral group. There is a correspondence between conjugacy classes in $G_m$ and pairs of equivalence classes of $ax^2\pm bxy+cy^2$ of discriminant $d$, such that an unramified prime has its Frobenius in a conjugacy class iff it it represented by the corresponding form. This is why we can apply Chebotarev.

1

Accoring to H. Lenstra, Chebotarev's theorem holds both for Dirichlet and for natural density (but he doesn't give a reference in this document). Applying Chebotarev to the extension $H/\mathbb{Q}$ where $H$ is the Hilbert class field of $\mathbb{Q}(\sqrt{-n})$ gives the result you want. (At least for primitive discriminants; for non-primitive discriminants youe need an appropriate generalization of the Hilbert class field).