= Discriminant criterion for prime representation by a binary quadratic form
{title2=$p\text{ represented}\iff d\text{ is a square modulo }p$}
For odd prime $p$ and an integral-form discriminant $d$, representation of $p$ by some form of discriminant $d$ is equivalent to solvability of $b^2\equiv d\pmod p$. A primitive representing vector can be completed to a unimodular change giving leading coefficient $p$. Conversely choose $b$ with the required parity and use $[p,b,(b^2-d)/(4p)]$.
Back to article page